Home Forums WinForms controls Xceed Grid for WinForms RowSelector Double-Click?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15692 |

    I would like to handle a double-click event anywhere on a read-only row. I can do this for the cells by subscribing to the event for each cell, but would also like to have a double click on the row selector fire the same event.

    I see that there is a .RowSelectorPane.DoubleClick event that I have subscribed to in the Form.Load handler, but it doesn’t seem to fire.

    Is this possible?

    Imported from legacy forums. Posted by rbh (had 4552 views)

    Xceed Support
    Member
    Post count: 5658

    It is not possible to get the DoubleClick event for the Row. However, you can trigger the same event for the cells and the RowSelector (little rectangle on the left).

    e.g.,
    <code>
    private void Form1_Load( object sender, EventArgs e )
    {
    //Load data
    gridControl1.ReadOnly = true;

    foreach( Cell cell in dataRowTemplate1.Cells )
    {
    cell.DoubleClick += new EventHandler( cell_DoubleClick );
    }

    dataRowTemplate1.RowSelector.DoubleClick += new EventHandler( RowSelector_DoubleClick );
    }

    void RowSelector_DoubleClick( object sender, EventArgs e )
    {
    System.Diagnostics.Trace.WriteLine( “Select Selector” );
    }

    void cell_DoubleClick( object sender, EventArgs e )
    {
    System.Diagnostics.Trace.WriteLine( “Select Cell” );
    }
    </code>

    Imported from legacy forums. Posted by CharlesB (had 3096 views)

    User (Old forums)
    Member
    Post count: 23064

    How to get this colletion:

     

    dataRowTemplate1.Cells ?

    Imported from legacy forums. Posted by Eutanazy (had 277 views)

    User (Old forums)
    Member
    Post count: 23064

    Are you in .NET or WPF?

    This is for .NET grid forums.

    Imported from legacy forums. Posted by André (had 2623 views)

    User (Old forums)
    Member
    Post count: 23064

    I am using Grid on Win forms…. I am getting compile time error on “dataRowTemplate1.Cells”

     

    Any way to overcome this..???

    Imported from legacy forums. Posted by bdmsoft (had 211 views)

    User (Old forums)
    Member
    Post count: 23064

    Sorry… it is a my mistake now working… [:)]

    Imported from legacy forums. Posted by bdmsoft (had 3129 views)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.