How to filter data from datagridview using combobox

raviteja

Member
Joined
Oct 15, 2019
Messages
8
Programming Experience
Beginner
I have a combobox with Header , Row and data grid view with field Id,desc,fieldtype.i want to get rows with having H in fieldtype when we select Header in combobox and to filter Rows with having R in filedtype when we select Row in combobox
 
Populate a DataTable with your data, bind that to a BindingSource and then bind that to the DataGridView. You can then simply set the Filter property of the BindingSource to filter the data, probably on the SelectedIndexChanged or SelectionChangeCommitted event of the ComboBox.
 
Is this WinForms, WebForms, or WPF? Is the "data grid view" referred to in the original post the DataGridView control in WinForms?
 
Back
Top Bottom