Home Forums WinForms controls Xceed Grid for WinForms C# doubleclick event question – please help! Reply To: C# doubleclick event question – please help!

User (Old forums)
Member
Post count: 23064

You don’t need the loop. If you use the loop, you have to do it each time the datarows are built. A better method is: subscribe the DoubleClick event of the DataRowTemplate. When the grid adds a new DataRow, that DataRow gets all the events of the template row.

// init method
myGridControl.DataRowTemplate.DoubleClick += new EventHandler(row_DoubleClick);

private void row_DoubleClick(object sender, EventArgs e)
{
MessageBox.Show(“row_DoubleClick”);
}

Imported from legacy forums. Posted by Tommy (had 275 views)