I am using CellClick event to get the row and column clicked.
Now when the row header is clicked, it gives me the last column selected index.
This will create an issue for me since i need to perform actions on the current selected row and column. How can i tackle this? I have seen tons of help but all of these talk about column header click.
Here is my basic test to check the row and col index when cell is clicked
private void dgvUsers_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (dgvUsers.CurrentRow == null || dgvUsers.IsLoading()) return;
var row = dgvUsers.CurrentCell.RowIndex; //CurrentRow.Index;
var col = dgvUsers.CurrentCell.ColumnIndex;
var ugactive = _ugActive;
}
In the above code, IsLoading is just an extension method that is checking for a particular text placed inside the tag.