Home › Forums › WinForms controls › Xceed Grid for WinForms › Catching the doubleclick event on a ColumnManagerRow
-
AuthorPosts
-
#14107 |
How to I catch a double click event on a ColumnManagerRow? The event is set but the process seems to skip the event.
Imported from legacy forums. Posted by bluffrat (had 4047 views)
Hi,
Here is the answer from my colleague :
“When dealing with mouse and keyboard events, if rows contain cells, it is the cells that will raise the mouse and keyboard events.
This said, you will need to subscribe to the DoubleClick event of each cell in the ColumnManagerRow rather than the ColumnManagerRow itself.”
Imported from legacy forums. Posted by Matt (had 292 views)
Hi, I’ve tried your suggestion but it still would not work…
Here’s my code:
private void celldataRowTemplate7TableName_DoubleClick(object sender, System.EventArgs e)
{
MessageBox.Show(“AAA”);
}What’s wrong????
Imported from legacy forums. Posted by peyton (had 252 views)
This worked fine on my end :
foreach(Cell cell in columnManagerRow1.Cells)
{cell.DoubleClick +=new EventHandler(cell_DoubleClick);
}
}
private void cell_DoubleClick(object sender, EventArgs e)
{
MessageBox.Show(“test”);
}Imported from legacy forums. Posted by Matt (had 187 views)
Adding the handler makes it work. Thanks.
I just don’t understand why does added event handler work and not the exposed one?
Imported from legacy forums. Posted by bluffrat (had 299 views)
Just FYI on this – and here’s my CMA comment: I’m a vb.net developer, not C# though I seriously doubt the language will have any impact on my comment:
Any datarows loaded into the grid BEFORE you attach these new handlers will NOT be subscribed to the attached methods.
So make sure you’re attaching the handlers prior to loading any data.
-LK
Imported from legacy forums. Posted by Curtis (had 5173 views)
-
AuthorPosts
- You must be logged in to reply to this topic.