How to select row with mouse click.
Hi There,
Thanks for your awesome support.
I want to know how to select the row value by right click.
Thanks in advance:.
0
-
Hello,
The code demonstrates how to select a row:
grid.MouseDown += delegate(object sender, MouseEventArgs e)
{
if(e.Button == MouseButtons.Right)
{
Row row = grid.HitTests.RowTest(e.Location);
if(row != null)
{
row.Selected = true;
}
}
};Regards,
Dapfor0
Please sign in to leave a comment.
Comments
1 comment