So, if I'm using a datagrid and only want to display and edit the data, I
use a DataTable which I created from my DataAdaptor. If I want to filter,
sort or search my data, I need to use a DataView.
When you use a windowforms datagrid you can better or always use a dataview
or the in the datatable build in dataview what is the datatable.defaultview
The sort by the user in the datagrid is reflected in the
defaultview/dataview.
To get the rows you can than use the bindingmanagerbase.position
So, if I'm using a datagrid and only want to display and edit the data, I
use a DataTable which I created from my DataAdaptor. If I want to filter,
sort or search my data, I need to use a DataView.
All datatables have a default dataview. When you bind a datatable to a
windows form datagrid you are actually binding to the datatables default
dataview.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.