Hi Guys,
In my application I have a search facility in which I am using a data reader to fetch the records according to a SQL statement. Also, in a datagrid I show the results as it is more convenient to the user. The way I am showing the data in the datagrid is that I create a dataview of the table in the DB, then I use the ROWFILTER method to filter the records according to the entry of the user.
E.G. Dataview.RowFilter = "Item_name LIKE '%" & txtsearchby.Text & "%'"Then I use the dataview as the source of the datagrid.
DataGrid1.DataSource = dv
The problem now is when I need to filter the records in the dataview according to more than one column. Say 2 columns.
What is the best way for me to do this ?!
Any help will be much appreciated !
In my application I have a search facility in which I am using a data reader to fetch the records according to a SQL statement. Also, in a datagrid I show the results as it is more convenient to the user. The way I am showing the data in the datagrid is that I create a dataview of the table in the DB, then I use the ROWFILTER method to filter the records according to the entry of the user.
E.G. Dataview.RowFilter = "Item_name LIKE '%" & txtsearchby.Text & "%'"Then I use the dataview as the source of the datagrid.
DataGrid1.DataSource = dv
The problem now is when I need to filter the records in the dataview according to more than one column. Say 2 columns.
What is the best way for me to do this ?!
Any help will be much appreciated !