Link to home
Start Free TrialLog in
Avatar of dantcho
dantchoFlag for United States of America

asked on

suppressing nested GridView if a row is not selected

hello, i successfully implemented this code:

http://msdn.microsoft.com/en-us/library/aa992038(v=VS.90).aspx

the problem i'm having with it is this: I need to be able to suppress the nested grid for rows which are not presently selected, otherwise the control looks completely ridiculous ( see image )
 User generated image
the nested grid should ONLY show up for "INCOME" because that is the selected parent category. housing and transportation should not display anything
Avatar of dantcho
dantcho
Flag of United States of America image

ASKER

update: this was only working for me because i still had SelectedValue of the parent grid loading my select parameter of the child grid

when i try to rely solely on the code posted by microsoft, it actually doesnt work at all

SqlDataSource s = (SqlDataSource)e.Row.FindControl("SQLISPSteps");
            s.SelectParameters[0].DefaultValue = e.Row.Cells[0].Text;

the e.Rows.Cells[0].Text returns NULL when i add a breakpoint and investigate, eventhough as you can clearly see in the image i posted that the values are not null
ASKER CERTIFIED SOLUTION
Avatar of dantcho
dantcho
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial