Alpha Video Training
Results 1 to 17 of 17

Thread: Show linked child grid based on field/condition in parent grid

  1. #1
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,050

    Default Show linked child grid based on field/condition in parent grid

    Hi
    This problem has been asked here in the forum in 2010 and 2011 with no visible solution.
    Basically, i would like to show a linked child grid only based on the value of a field in the parent grid. How do we do that?

    TIA
    Jaime

  2. #2
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Show linked child grid based on field/condition in parent grid

    Are you referring to the show/hide expression in the linked content definition ?

    I put the linked content section in a div with some id & then I use javascript to check for a field value in the parent grid to decide whether to show the linked content section yes or no. Very simple although I have to admit that the help text for the show/hide expression is rather minimal: I gave it a quick try with "id=somevalue" where "id" is a numeric field in my parent grid & also with an xbsic udf but it does not seem to work. I think that show/hide expression is something being evaluated at render time only and that would explain the reference to session vars in the help.
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  3. #3
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Show linked child grid based on field/condition in parent grid

    hello
    you may be able to do in row expander and place the linked content in the expanded row.
    and hide the expander icon for any condition or show for any condition.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  4. #4
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,050

    Default Re: Show linked child grid based on field/condition in parent grid

    Frank
    I played a lot with that "show/hide expression" but it didn't work. Did you manage to have it working?

  5. #5
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,050

    Default Re: Show linked child grid based on field/condition in parent grid

    Govindan
    Do you mean i can use the row expander without the + icon and put the child grid completely underneath the parent, like for a normal linked child grid?

    Jaime

  6. #6
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Show linked child grid based on field/condition in parent grid

    No. You will place as a row expander, but you can hide the + button for certain conditions
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  7. #7
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Show linked child grid based on field/condition in parent grid

    Jaime,

    As I told you I use a div & javascript to hide/unhide the section. Nevertheless I asked Selwyn for some clarification as the help text was rather minimal. This will be in the next pre-release as help text:

    newshhelp.png
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  8. #8
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,050

    Default Re: Show linked child grid based on field/condition in parent grid

    Yup Frank, the putting the section in a div and using javascript seems logical to me. Will give it a try.

    Many thanks!
    Jaime

  9. #9
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Show linked child grid based on field/condition in parent grid

    I could be wrong, but
    Linked contents, when they are defined, are placed in a div during definition time. You don't have to place them in yet another div.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  10. #10
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Show linked child grid based on field/condition in parent grid

    You are right but in a situation where you have a detail view below the parent grid & then for example you want to put the linked content section to the right of the detailview you do need a div in order to layout the thing in the master template. It all depends.
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  11. #11
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,050

    Default Re: Show linked child grid based on field/condition in parent grid

    Sorry cannot manage to get it working...
    Could you please help me with the semantics?

    Assuming in my parent grid, i have a field named "Type", and my linked contect section is named myContent, what do i put in the javascript show/hide expression if i want the content to appear only when Type='y' ?

  12. #12
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Show linked child grid based on field/condition in parent grid

    Check out this video http://screencast.com/t/H5OszvCeP
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  13. #13
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,050

    Default Re: Show linked child grid based on field/condition in parent grid

    Frank, the way you put it in the video, it seems so simple :-)

    A million thanks for your help!
    Jaime

  14. #14
    "Certified" Alphaholic Clipper87's Avatar
    Real Name
    Frank
    Join Date
    Dec 2008
    Location
    Antwerp, Belgium
    Posts
    1,891

    Default Re: Show linked child grid based on field/condition in parent grid

    Alpha rocks!
    Frank

    Tell me and I'll forget; show me and I may remember; involve me and I'll understand

  15. #15
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: Show linked child grid based on field/condition in parent grid

    Quote Originally Posted by Clipper87 View Post
    thanks for the video.
    when i tried the same my syntax was wrong and i was getting script error.
    your video helped to understand how to do it.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  16. #16
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,050

    Default Re: Show linked child grid based on field/condition in parent grid

    Ghandi, i had syntax errors even when doing it like in the video ( forgot a parenthesis here and there ) that's why it helps so much to see it working like that...

  17. #17
    "Certified" Alphaholic
    Real Name
    Jaime Ben David
    Join Date
    Jan 2011
    Location
    Karkur, Israel
    Posts
    1,050

    Default Re: Show linked child grid based on field/condition in parent grid

    Quote Originally Posted by Clipper87 View Post
    Alpha rocks!

    You bet!

Similar Threads

  1. How do I access linked grid Parent Field > Child Field linking values in child grid?
    By TheSmitchell in forum Application Server Version 11 - Web/Browser Applications
    Replies: 5
    Last Post: 10-02-2012, 04:04 PM
  2. How to use parent grid data in linked child grid calculation?
    By WindForce in forum Application Server Version 11 - Web/Browser Applications
    Replies: 3
    Last Post: 12-08-2011, 10:29 AM
  3. Showing data from parent grid field in linked child grid
    By WindForce in forum Application Server Version 11 - Web/Browser Applications
    Replies: 3
    Last Post: 11-09-2011, 09:43 AM
  4. Show button in Parent Grid based on value in field on Child Grid
    By Cammy in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 11-03-2011, 01:17 PM
  5. Reading Parent Grid Linked Index Value from within Child Grid
    By kimhere in forum Application Server Version 10 - Web/Browser Applications
    Replies: 0
    Last Post: 04-25-2011, 04:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •