myDataGridView.DataSource = myDataSet; myDataGridView.DataMember = "myTableName"; //however filtering its rows like this doesn't work: myDataSet.Tables["myTableName"].DefaultView.RowFilter = "...";
//choice 1 myDataGridView.DataSource = myDataTable; //then filter rows like this: myDataTable.DefaultView.RowFilter = "..."; //choice 2 BindingSource bs = new BindingSource(myDataSet, "myTableName"); myDataGridView.DataSource = bs; //then filter rows like this: bs.Filter = "...";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)