SelectedIndex is not available in Winform datagrid control.
>>Once the data is sorted, you have to go through binding context object.
>
>Hi Jayesh,
>
>I've been able to do this without a binding context. If the grid is bound to the DefaultView of a DataTable, I can do something like (I don't have VS.NET or the code with me, so this is just from memory):
>
>
dataTable.DefaultView[dataGrid.SelectedIndex]["id"].ToString();
>
>Sorting the grid must also sort the default view identically, which is why the index numbers match up regardless of how the grid is sorted.
>
>Do you know if there are advantages or disadvantages to using this method versus the binding context?
- Jayesh