DataGrid Events

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kendal Goodrich

    #1

    DataGrid Events

    Can someone please help. I am trying to make use of a datagrid in C#. I
    create it and fill it with no problem. When it comes to double clicking it
    I have problems. The double click event will not fire unless I double click
    on the Row Header. If I remove the row header, I cannot get the event to
    fire at all. I need the event to fire when I double click on a cell, not
    the row header. Can anyone help me please?????

    Thanks,
    Kendal


  • Dmitriy Lapshin [C# / .NET MVP]

    #2
    Re: DataGrid Events

    Hi,

    You can try to override the OnDoubleClick method in a control inherited from
    the DataGrid. If this does not help, you can go further and override the
    grid's WndProc method to handle WM_LDBLCLICK notifications.

    --
    Dmitriy Lapshin [C# / .NET MVP]
    X-Unity Test Studio

    Bring the power of unit testing to VS .NET IDE

    "Kendal Goodrich" <kgoodrich@jeff ersonmedical.ne t> wrote in message
    news:uZ05tKqjDH A.2012@TK2MSFTN GP12.phx.gbl...[color=blue]
    > Can someone please help. I am trying to make use of a datagrid in C#. I
    > create it and fill it with no problem. When it comes to double clicking[/color]
    it[color=blue]
    > I have problems. The double click event will not fire unless I double[/color]
    click[color=blue]
    > on the Row Header. If I remove the row header, I cannot get the event to
    > fire at all. I need the event to fire when I double click on a cell, not
    > the row header. Can anyone help me please?????
    >
    > Thanks,
    > Kendal
    >
    >[/color]

    Comment

    Working...