Home Forums WinForms controls Xceed Grid for WinForms How to get Row Number in Cell DblClick event

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

    Hi All,

    How do I determine the rowNum of the selected cell in the Cell DoubleClick event?

    TIA
    beny

    Imported from legacy forums. Posted by beny (had 1893 views)

    User (Old forums)
    Member
    Post count: 23064

    In the event handle, you can do the following :

    Xceed.Grid.DataRow row = (Xceed.Grid.DataRow)( ( Cell )sender).ParentRow;
    int rowIndex = row.Index;

    So you cast the sender to a cell, with which you get the ParentRow. Note that this will work only if you have subscribed to the DataRowTemplate cells, else an exception may be raised if the row that is clicked is not a DataRow.

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

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