I've got a master grid with a parameter row that has several detail grids, all tied to the master. Currently, there's a stored proc that returns the data for all of these grids in a single resultset. When I was using a single Detailtable with a GroupByFields, the grids would split themselves out by that breakout field beautifully. But I've found out that the child grids need to have different sets of columns based on the type of breakout that it is.
Initially, I had done this by hiding all of the columns, and only making it visible if that particular breakout needed to show it. But that just gave me a wide list of columns that were mostly empty, since most of the columns did not apply to every breakout type.
I see that I can create a separate detail grid for each type of breakout, and attach a separate SqlDataSource to each one, but since the DataBind method does not work there, it's going to make the process lengthy and difficult. Is there a way to attach the entire set of detail tables to a single stored proc call (returning either a single resultset or one per breakout), and only map out a single detailtable on the front page?
I've got 17 different breakout detailtables, with column spreads something like this:
Type 1: Col 1, 2, 3, 4
Type 2: Col 2, 3, 4, 5
Type 3: Col 5, 6, 7, 8
Type 4: Col 1, 3, 6
Originally, I had every possible column returning, and would only show the ones I needed. The code was relatively compact and clean at that point. Elegant, really. I'd like to find a way to keep that clean codebase if possible.
Initially, I had done this by hiding all of the columns, and only making it visible if that particular breakout needed to show it. But that just gave me a wide list of columns that were mostly empty, since most of the columns did not apply to every breakout type.
I see that I can create a separate detail grid for each type of breakout, and attach a separate SqlDataSource to each one, but since the DataBind method does not work there, it's going to make the process lengthy and difficult. Is there a way to attach the entire set of detail tables to a single stored proc call (returning either a single resultset or one per breakout), and only map out a single detailtable on the front page?
I've got 17 different breakout detailtables, with column spreads something like this:
Type 1: Col 1, 2, 3, 4
Type 2: Col 2, 3, 4, 5
Type 3: Col 5, 6, 7, 8
Type 4: Col 1, 3, 6
Originally, I had every possible column returning, and would only show the ones I needed. The code was relatively compact and clean at that point. Elegant, really. I'd like to find a way to keep that clean codebase if possible.