Home Forums WinForms controls Xceed Grid for WinForms Right click and get row values

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

    How can I get the row details by right clicking?

    Imported from legacy forums. Posted by PETE (had 1964 views)

    Xceed Support
    Post count: 5658

    Hi Peter,

    Because the row (CellRows) contain cells, it is the cells that will capture the events and not the cellrow. Therefore, you will need to subscribe to the events of each cell in the row if you want to know when the user clicks on a row. For example:


    GridControl1.DataSource = DataSet11
    GridControl1.DataMember = “Orders”

    Dim cell As DataCell

    For Each cell In GridControl1.DataRowTemplate.Cells
    AddHandler cell.Click, AddressOf Me.cell_Click
    Next cell


    In the Click event handler, you can then check the cell’s <a href=”http://doc.xceedsoft.com/products/gridNet/ref/xceed.grid.cell.parentrow.html”>ParentRow</a&gt; property to access the row. For example:

    Dim cell As Cell = CType( sender, Cell )
    Dim parentRow As CellRow = cell.ParentRow

    I hope this helps!

    Imported from legacy forums. Posted by Jenny [Xceed] (had 3119 views)

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