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
245
Synchronize two grids
posted

I have a DataSet with two tables and a DataRelation established between them.  I want to have two UltraGrids with ultraGrid1 bound to dataTable1 and ultraGrid2 bound to dataTable2, but I want dataTable2 to show only filtered data based on the row selected in ultaGrid1 where the data matches the critera from the DataRelation.

My attempts to do this end up with ultaGrid1 being a hierarchical grid, with the data in the data relation actually being under the "+" sign.  Is it possible to do this?  I can do it manually with DataViews, but I was wondering if there was an automatic solution through Data Binding.  If there is an example you can point me to, I would appreciate it.

Thanks.

Bill

Parents
No Data
Reply
  • 469350
    Suggested Answer
    Offline posted

    Hi Bill,

    whheine said:
    My attempts to do this end up with ultaGrid1 being a hierarchical grid, with the data in the data relation actually being under the "+" sign.  Is it possible to do this?

    You can set the grid.DisplayLayout.ViewStyle to SingleBand on the first grid so it only shows the root band.

    Then all you have to do is bind the second grid to the Relationship (not the child table), and it should all work automatically as long as both grids are on the same container or have the same BindingContext.

Children