FlexGrid - How do you get the row a user is hovering over?

Posted by: paul on 3 October 2019, 11:06 am EST

    • Post Options:
    • Link

    Posted 3 October 2019, 11:06 am EST

    Hi,

    I have a flex grid grouped by a column and am trying to identify which row a user is hovering over in order to show a conditional tooltip. I have tried using the hittest method, passing in me.pointtoclient(cursor) x an y coordinates. The row number returned however doesn’t match the index of the rows collection i.e. row 2 in the rows collection is classed as row 3 by the hit test as it appears to be counting group rows.

    Is there a ways of returning the exact row being hovered over?

    Any help would be greatly appreciated.

    Paul

  • Posted 4 October 2019, 12:40 am EST

    Hello,

    When grouping is applied, Node rows are also included in the RowsCollection of FlexGrid so it is showing the correct value of the row being hovered.

    As you don’t want the grouped rows to be counted so you can subtract the NodeRows before the current row go get your desired value.

    Please refer to the attached sample demonstrating the same.

    Regards,

    Prabhat Sharma.

    HitTestFlexGridDemo1.zip

  • Posted 4 October 2019, 4:39 am EST

    Hi Prabhat,

    Thanks for your example. This has solved my issue and also pointed me in the right direction to implement row hover highlighting.

    Regards,

    Paul

Need extra support?

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

Learn More

Forum Channels