Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
330
Binding a Dataset having Parent Child relationship constraint on Row Expanded ;UltraWinGrid
posted

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.

Parents
  • 330
    posted

    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,

    Scott.

Reply Children