Position on datagrid v position in dataset
I have a datagridview bound to a dataset - no problem so far, the grid shows exactly what I expect.
On double click, I want to load another form to show the detail of the currently selected row. I do this by setting the new form's bindingsource datasource and position to be that of the calling form.
This works fine until I sort the grid - I then get the wrong record. I get the nth record in the dataset whereas I want the record shown on the nth row of the grid.
I sure this has something to do with binding contexts and currency managers but at the moment my brain is hurting and I haven't found a really clear and simple explanation.
Calling code is as follows:
PrivateSub StocksDataGridView_DoubleClick(ByVal senderAsObject,ByVal eAs System.EventArgs)Handles StocksDataGridView.DoubleClick f.StocksBindingSource.DataSource = ShareMonitorDataSet f.StocksBindingSource.Position = StocksBindingSource.Position f.ShowDialog()
I would really appreciate some help.
Liz

