-
Select
I add a Button and put this code;
Dim aFind As String = InputBox("Enter a Employee No.", "Search for Employee No.")
Dim filteredRows() As DataRow = DataSet11.Employee.Select("empno='" & aFind & "'")
But it has no reaction. The DataGrid still show all the records.
What's wrong with this?
-
You have to add a clear statement first.
DataSet11.clear() 'Clear the dataset's data
and use the sql statement filter it out and fill it into the dataset
-
If you set the datasource of the datagrid to a DataView instead you can use the DataView.RowFilter property to filter your data.