We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Filter Hierarchical GridDataBoundGrid

Is it possible to filter 2-level GDBG after data has been loaded? I use dataset with two tables as DataSource. Then I would like to filter data on both levels when user checks/unchecks checkbox "Hide not active" or "Hide not completed", etc. I tried DefaultView.RowFilter and DataViewManager but with no success.

3 Replies

AD Administrator Syncfusion Team February 7, 2006 03:41 PM UTC

My code: dataset.Tables["Table0"].DefaultView.RowFilter = filterCreteria1; dataset.Tables["Table1"].DefaultView.RowFilter = filterCreteria2; grid.DataSource = dataset; How can I make grid to be filtered?


AD Administrator Syncfusion Team February 8, 2006 12:45 PM UTC

Hi Olga, The DataViewManager can be used to filter the child table and after setting the RowFilter reset the DataBinding of the grid. And the currencyManager.List can be used as the DataView to filter the root level table. Here is a sample. Regards, Calvin.

40578.zip


AD Administrator Syncfusion Team February 9, 2006 02:29 PM UTC

Calvin, Thank you for the sample. I''ve already resolved this problem by similar way: dvm = new DataViewManager(dataSet); dvm.DataViewSettings[tableName1].RowFilter = filterString1; dvm.DataViewSettings[tableName2].RowFilter = filterString2; grid.DataSource = dvm; It also works!

Loader.
Live Chat Icon For mobile
Up arrow icon