Hi,
I have an UltraWinGrid on a windows form, to which I bind a dataset to display a data.
When I click on any one of the rows by clicking the '+' symbol, I must display an indented set of at least one or more rows as a child row.
Here's my approach:
(a) Get a new dataset containing only those child rows.
(b) Create a parent child relationship constraint with the existing main dataset and bind it to the grid.
If the above approach is not the best, Please specify what can be the best approach to do this.
Thanks in advance,
Scott.
Adding to the above, If I place the code in a Button click event, it properly displays the parent child as a related view on the Grid. However, if i do this on a BeforeRowExpanded event, it does not.
Hello,
I bind the grid to a dataset which only has one table with no child tables. Now inside the mygrid_BeforeRowExpanded event, I create a new dataset which has the same data as the current dataset plus child relation constraint by using DataRelation. Now the dataset has two tables. One is parent and the other is child with a unique key.
I now call mygrid.DataSource = newdataset;
When I execute it and try clicking the '+' sign this does not show any child rows. It only shows the basic grid with parent rows.
Am I missing any thing. Please help.
Thanks,