Get Selected Row FlexSheet

Posted by: oskarputraa on 21 August 2019, 2:12 am EST

    • Post Options:
    • Link

    Posted 21 August 2019, 2:12 am EST

    Hi,

    Anyone know how to get selected row index and data in FlexSheet ?

    Thanks,

    Oskar Putra

  • Posted 21 August 2019, 5:03 am EST

    Hi Oskar,

    You may use the selection property of the FlexSheet to get the row index of the selected row. The selection property is an instance of CellRange class that contains information about a range of cells. To get the row index from the selection, you may use the row property.

    And to get the data bound to the selected row, you may use the dataItem property of the Row class, But, you cannot get the dataItem directly from the FlexSheet. For this, you will need to get the reference to the grid bound to the selectedSheet of the FlexSheet:

    var rowIdx = flexsheet.selection.row;
    var data = flexsheet.selectedSheet.grid.rows[rowIdx].dataItem;
    
    

    Regards,

    Ashwin

    API Reference:

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels