User (Old forums)MemberNovember 21, 2005 at 3:55 pmPost count: 23064
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)User (Old forums)MemberNovember 22, 2005 at 2:46 pmPost count: 23064
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)User (Old forums)MemberNovember 24, 2005 at 9:06 amPost count: 23064
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)
Imported from legacy forums. Posted by peyton (had 252 views)User (Old forums)MemberNovember 24, 2005 at 3:42 pmPost count: 23064
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)
Imported from legacy forums. Posted by Matt (had 187 views)User (Old forums)MemberDecember 2, 2005 at 2:56 pmPost count: 23064
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)User (Old forums)MemberJanuary 24, 2006 at 1:34 pmPost count: 23064
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.
Imported from legacy forums. Posted by Curtis (had 5173 views)
- You must be logged in to reply to this topic.