I have a System.Windows.Forms.DataGridView
filled with data. I\'m using some code like this:
System.Data.DataTable dataTable1;
System.Windows.Fo
If I understand you correctly, you need the filtered rows displaying in DataGridView
as DataTable.
You can make use of DataTable.DefaultView property for this purpose which includes all the filters.
Try this
BindingSource bs = (BindingSource)dataGridView1.DataSource;
DataTable table = (DataTable)bs.DataSource;
DataTable filtered = table.DefaultView.ToTable();// here we get filtered datatable