Home Forums WinForms controls Xceed Grid for WinForms How to capture double click on a row.

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

    I need to know how to capture a double click on a row in the grid. How do I do this?

    Imported from legacy forums. Posted by hellswraith (had 2682 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi,

    You need to subscribe to each of the rows’ cells’ .DoubleClick event. The best way to do this is by using the dataRowTemplate between a call to the gridControl’s .BeginInit and .EndInit. The grid must also be filled between those calls.

    In the cells’ .DoubleClick event, cast the sender as a cell and check it’s .parentRow property if you need to know the row the doubleClicked occurred on.

    ie:

    oleDbAdapter1.fill(dataSet11);

    gridControl1.BeginInit();

    gridControl1.SetDataBindings(dataSet11,”Employees”);

    foreach(Xceed.Grid.Cell c in gridControl1.DataRowTempalte.Cells)
    {

    c.DoubleClick += new System.EventHandler(this.Cells_DoubleClick);

    }

    The is also a knowledge base article on this matter:

    http://xceed.com/KB/questions.php?questionid=142

    Regards,

    Imported from legacy forums. Posted by PL (had 7479 views)

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