RadGridView detect CellClick event button

c#, telerik, telerik-grid

Solution

You can detect which cell was clicked by using Mouse Click event.

Then you have to cast sender to RadGridView, and then use CurrentCell property.

GridViewCellInfo dataCell = (sender as RadGridView).CurrentCell;

If you want to which mouse button was clicked use:

if (e.Button == MouseButtons.Right)
{
//your code here
}

Problem

How can I detect which mouse button was pressed in event CellClick, or how can I detect which cell was pressed in event MouseClick.

Original source