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 need the loop when you subscribe to the doubleClick event of each row.

The loop is only executed once.

Like this:

//place this in a init method…
foreach( Xceed.Grid.DataRow row in gridControl1.DataRows)
{
row.DoubleClick += new EventHandler(row_DoubleClick);
}

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

I think this is the only way. And it performs without problems.

Regards
Thomas

Imported from legacy forums. Posted by C# (had 480 views)