>It is working fine, but I want the bindingcontext to move to the selected record.
>I tried to set the bindingcontext position property to datarow(0) RowId property, but it says it's PRIVATE.
Ah, you didn't say you were trying to move the position of a BindingContext! <s>
That's got me stumped.
First, there is no RowID property that I can identify. You can use the Find method of DataView, and determine the index, and then set the BindingContext's Position property to the value of the index. However, that won't work if the user can change the sort order of the records, as they can when using a DataGrid. I did some experimentation, and even if the record order is changed in the DataGrid, a DataView instantiated from the DataSet and DataTable to which the DataGrid is bound retains the DataTable's original sort order, Thus the index of a record in the DataView will not correspond to the Position of the same record in the BindingContext.
I think that there is a sorted DataView that represents the records as displayed in a DataGrid (and other controls), but have been unable to find how to obtain a reference to that particular DataView.
>>-Steve->>
Steve Sawyer
Geeks and Gurus, Inc.