RP wrote:
CurrentCell retrieves information of the selected cell in a column.
What I want is that when an entire row is selected, say when I select
row 3 then I want to value of column 2.
You can use the Cells collection in the CurrentRow object for this. It's
probably better to get the actual DataSource information but if you
absolutely have to have what's in the grid this is the way to do it:
someVar = yourDataGridView.CurrentRow.Cells["someColumn"].Value;
There may be other/better ways to retrieve a particular column in the
currently selected Row, but I've used the above method in several places.
Chris.