Uploaded image for project: 'Beehive'
  1. Beehive
  2. BEEHIVE-416

DataGrid's setRow feature can lead to skipped rows when going to a previous page

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • V1Beta
    • v1m1
    • NetUI
    • None

    Description

      If the you call setRow(row) on a dataGrid and the row is not the first row of a page you will miss items when going to the previous page. Here is more of an explanation via an example:

      Some data to help explain (I also have a repro if you want it)

      row value
      1 A
      2 B
      3 C
      4 D
      5 E
      6 F
      7 G
      8 H

      Imagine the pageSize is 3 - this means on the first page you'll see rows with the values A B C and on the second page D E F

      case 1 - Now if you set the row to 4 you will see D E F and if you go to the previous page you'll see A B C - good so far

      case 2 - Now set the row to 5 and you will see E F G (labeled page 2) and if you go to the previous page you'll see A B C - rather than B C D as you might expect. Notice that D is skipped in going to the previous page.

      I see two options.

      option 1 - be consistent with the page breaks and let the row fall where it may rather than forcing the "set row" to be the first row of the grid. I would want to be able to highlight this row with a style.

      option 2 - make the "set row" the first row, as it is now, and adjust the page breaks accordingly so that going to the previous page doesn't skip items. This means that the first page may have less than "page size" number of items.

      I favor option 1

      Attachments

        Activity

          People

            njantz Nathan Jantz
            rohrlich John Rohrlich
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: