I am having problems programmatically selecting a row in a datagrid.
I have a datagrid that is bound to a dataview. I filter and sort the dataview. The currency manager referenced is the dataview's
I then want to a select a specific row programmatically, but because the order of the dataview is changed, I cannot associate a particular row with the currency manager position.
Currently I am using the following code to try an select the row.
lngRef is the primary key of the row
cmList is the currency manager
For iRow = 0 To cmList.Count - 1
If cmList.List(iRow)("SortID") = lngRef Then
cmList.Position = iRow
Exit For
End If
Next
Is there any positive direct way of finding the position of a row within the dataview and then selecting it.
I have been struggling with this problem for some time now and have not come accross a reasonable solution.
Any help will be appreciated.




Reply With Quote