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.
Unfortunately, activation email could not send to your email. Please try again.

Filter and DataGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

3410 Mar 17,2003 07:25 AM Jan 10,2006 01:33 PM Windows Forms 3
loading
Tags: FAQ
Dmitriy
Asked On March 17, 2003 07:25 AM

How can I apply filter to rows of Datagrid?

Anatolii
Replied On March 26, 2003 09:30 AM

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?

Administrator [Syncfusion]
Replied On March 28, 2003 04:07 AM

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.

Administrator [Syncfusion]
Replied On January 10, 2006 01:33 PM

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. >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;