Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Double clicking on datagrid cell

Posted on 2003-10-22
3
Medium Priority
?
384 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 500 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

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

618 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