Home › Forums › WinForms controls › Xceed Grid for WinForms › How to capture double click on a row. › Reply To: How to capture double click on a row.
Hi,
You need to subscribe to each of the rows’ cells’ .DoubleClick event. The best way to do this is by using the dataRowTemplate between a call to the gridControl’s .BeginInit and .EndInit. The grid must also be filled between those calls.
In the cells’ .DoubleClick event, cast the sender as a cell and check it’s .parentRow property if you need to know the row the doubleClicked occurred on.
ie:
oleDbAdapter1.fill(dataSet11);
gridControl1.BeginInit();
gridControl1.SetDataBindings(dataSet11,”Employees”);
foreach(Xceed.Grid.Cell c in gridControl1.DataRowTempalte.Cells)
{
c.DoubleClick += new System.EventHandler(this.Cells_DoubleClick);
}
The is also a knowledge base article on this matter:
http://xceed.com/KB/questions.php?questionid=142
Regards,
Imported from legacy forums. Posted by PL (had 7479 views)