Solved

Double clicking on datagrid cell

Posted on 2003-10-22
3
378 Views
Last Modified: 2012-05-04
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_DoubleClick);
}

protected void logTable_DoubleClick(object sender, EventArgs args)
{
                  
}

0
Comment
Question by:micahdaniels
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
testn earned 125 total points
ID: 9602691
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question