Thanks for this solution, but its somewhat limiting if radgridview has sorting enabled, following is my issue:
I was looking for this issue, though solution for which mouse got clicked is getting resolved but I'm facing a strange issue that I would like to mention.
If the grid is double-clicked I was using following method:
private void gridDQ_CellDoubleClick(object sender, GridViewCellEventArgs e)
GridCellElement cell = (GridCellElement)sender;
if (cell.RowIndex != -1 && cell.ColumnIndex != -1)
//Commented following code as I was getting first two rows data correct and for other rows I was getting value of two rows below
//int intCurrOrderNo = int.Parse(gridDQ.Rows[cell.RowIndex].Cells.Value.ToString());
int intCurrOrderNo = int.Parse(gridDQ.Rows[e.RowIndex].Cells.Value.ToString());
if (intCurrOrderNo > 0)
//Some work here...
After having look at ur code I re-wrote the desired code as:
private void gridDQ_MouseDoubleClick(object sender, MouseEventArgs e)
if (e.Button == System.Windows.Forms.MouseButtons.Left)
GridCellElement cell = gridDQ.ElementTree.GetElementAtPoint(e.Location) as GridCellElement;
if (cell != null)
int intCurrOrderNo = int.Parse(gridDisbursementQueue.Rows[cell.RowIndex].Cells.Value.ToString());
int intTemp = 0;
My mouse-button identification issue was sorted out but I'm getting the wrong value from "OrderNo" field afer grid is sorted on click of header column.
Thanks & Regards