micahdaniels
asked on
Double clicking on datagrid cell
How do i raise an event when double clicking on a c# datagridcell. I registered my delegate with the doubleclick event handler but events are only fired if i double click on any part of the grid except the cells, e.g. headers. The cell seems to select its content and swallow the the event. Maybe i do not understand how the datagrid does its event managment. Cells do not seem to have the own event handlers so it figure that the grid should tak responsibility. So Q1: How do i get the event to reach my handler. Q2: How do i turn off the cell content selection when single or double clicking. Perhaps the two are related. In relation to Q2, I have set the cell editing to readonly.
Any answers?
Thanks
Micah
public void foo()
{
this.logTable = new DataGrid();
this.logTable.ReadOnly = true;
this.logTable.DoubleClick+ =new EventHandler(logTable_Doub leClick);
}
protected void logTable_DoubleClick(objec t sender, EventArgs args)
{
}
Any answers?
Thanks
Micah
public void foo()
{
this.logTable = new DataGrid();
this.logTable.ReadOnly = true;
this.logTable.DoubleClick+
}
protected void logTable_DoubleClick(objec
{
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.