Home Forums WinForms controls Xceed Grid for WinForms Previous/Next Row

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

    Using data bound rows:

    I have a reference to the CurrentRow (which I assume is the one that contains the currentcell)

    How do I get a reference to the row just above or below it?

    -zorpie

    Imported from legacy forums. Posted by John (had 1816 views)

    User (Old forums)
    Member
    Post count: 23064

    – get the <b>visible</b> index, like this: grid1.GetSortedDataRows(true).IndexOf(grid1.CurrentRow)
    – the row above: if visible index > 0 then rowAbove = grid1.GetSortedDataRows(true)[index – 1]
    – the row below: if visible index < grid1.GetSortedDataRows(true).Count – 1 then rowBelow = grid1.GetSortedDataRows(true)[index + 1]

    Imported from legacy forums. Posted by Tommy (had 2986 views)

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