L
Larry Woods
I have a combobox and a datagrid on a form (VB.NET). I have the DataSource
of each set to a datatable. I use the combobox "SelectedValue" to perform a
Find in the combobox SelectedIndexChanged event procedure.
Here is what confuses me: Performing the Find repositions the datagrid
display.
What "wiring" causes the datagrid to recognize that the Find was executed,
and where in the doc does it say that "Find" essentially repositions the
"current row" pointer in the data table?
Pertinent Information ( Source of data: SQL Server: Northwind ):
DataAdapter:
SQL="Select CustomerID, CompanyName from Customers" ; Select Only
(Dataset created)
DataGrid:
DataSource: Dataset.Customers
ComboBox:
DataSource: Dataset.Customers
DisplayMember: CompanyName
ValueMember: CustomerID
Form OnLoad event (1 statement):
DataAdapter.Fill(Dataset)
SelectedIndexChanged event (1 statement):
Dataset.Tables(0).Rows.Find(ComboBox.SelectedValue)
Any explanation will be greatly appreciated.
TIA,
Larry Woods
of each set to a datatable. I use the combobox "SelectedValue" to perform a
Find in the combobox SelectedIndexChanged event procedure.
Here is what confuses me: Performing the Find repositions the datagrid
display.
What "wiring" causes the datagrid to recognize that the Find was executed,
and where in the doc does it say that "Find" essentially repositions the
"current row" pointer in the data table?
Pertinent Information ( Source of data: SQL Server: Northwind ):
DataAdapter:
SQL="Select CustomerID, CompanyName from Customers" ; Select Only
(Dataset created)
DataGrid:
DataSource: Dataset.Customers
ComboBox:
DataSource: Dataset.Customers
DisplayMember: CompanyName
ValueMember: CustomerID
Form OnLoad event (1 statement):
DataAdapter.Fill(Dataset)
SelectedIndexChanged event (1 statement):
Dataset.Tables(0).Rows.Find(ComboBox.SelectedValue)
Any explanation will be greatly appreciated.
TIA,
Larry Woods