Hello,
I have a hierarquical grid with two bands that is bound to a dataset.
What i would like is to have the same information/columns that are in the child band to the parent band? let´s say i push a button to do that.
The main reason is that i don't what to go 2 times to the database.
Thanks,
Alexandre
Hi Alexandre,
Okay, I think I understand, now. But there's no way the grid can alter the structure of your data like this. It seems to me that you need to build your data source so that it returns a single table with the data you want.
The grid will display the data as it gets it from the DataSource.
I'm not a SQL expert, but it looks like you should be able to create a SQL Query that would return a single table with two fields that combine data from both tables and only have to hit the table once.
Hello Mike,
Ok, i will try to explain with more detail!
I have 2 tables with a relation so i have a hieralquical grid, thats ok!
But what i would like is to join the information that is in the child band in the parant band ex:
Parent Band: Row 1 Column 1 Value: ABC
Child Band: Row 1 Column 1 Value: 123
Child Band: Row 2 Column 1 Value: 456
What i would like is only one band with the same information if possible in the same grid:
Row 1 Column 1 Value ABD Column 2 123
Row 2 Column 1 Value ABD Column 2 456
I achive this by creating 2 grids, one is the hierq (1 Dataset and 2 tables) and one with 1 dataset and 1 table. But i have to go 2 times to the database to get the same information of course with diferent views! Than i work with the wingrid.visible to show the grid that the client select with a radio button.
Thaks for the support,
I'm afraid I'm having a hard time understand your question. If there are two bands in your grid, then you presumably have 2 tables in your DataSet and a Relationship to connect the two tables.
So the grid has to show the columns that are actually defined in the two tables. And why would have to go to the database twice?