-
DataGrid Problem!
DataGrid Problem!
'Hi I've tried this code to filter my records.
DataSet11.Products.DefaultView.RowFilter = "ProductName like '" & txtFilter.Text & "%'"
'and follows this code to rebind the DataGrid
DataGrid1.DataSource=DataSet11.Products.DefaultView
And this code work! But when i want to navigate the record using this code.
the DataGrid still at the first record.
Me.BindingContext(DataSet11, "Employee").Position += 1
Any idea to solve this problem?
-
I think that's the way it should be. You are confusing the bindings:
You have bound the Datagrid to a Dataview object (DefaultView of dataset table 'Products') but you are changing the position of bindingmanager of the datatable of the dataset not the dataview. Remember that Dataview and DataTable are two different objects.
That was my idea anyway.