AN
Anatolii
March 26, 2003 02:30 PM UTC
I was just looking for an answer to the same question. There is a GridFilterBar class, I was wondering if it uses some publicly accessible methods in GridDataBoundGrid to filter rows or does it modify the datasource on the grid directly?
AD
Administrator
Syncfusion Team
March 28, 2003 09:07 AM UTC
If your Windows Forms DataGrid is bound ta a DataTable, say dt, then you can filter the displayed grid without changing its datasource, by setting the RowFilter property on the the defaultview of the datatable.
dt.DefaultView.RowFilter = "[Col1] LIKE 'a*'";
This would show only rows whose entry in Col1 starts with an a.
AD
Administrator
Syncfusion Team
January 10, 2006 06:33 PM UTC
Clay
How can I filter my GDBG if the Grid is bounded to a business object not to a data table.
Thanks
Gk
>If your Windows Forms DataGrid is bound ta a DataTable, say dt, then you can filter the displayed grid without changing its datasource, by setting the RowFilter property on the the defaultview of the datatable.
>
>dt.DefaultView.RowFilter = "[Col1] LIKE ''a*''";
>
>
>This would show only rows whose entry in Col1 starts with an a.
>