Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Synthetic ListGrid rows

    I need to display rows in a listgrid that are created from rows retrieved from an SQL data source. In essence, the database rows contain 1 or more ListGrid rows of information (variable). I was able to generate the rows on the server side using a DMI routing and building a Map data set. However, the paging mechanism doesn't work because I return more rows than is specified in the startRow and endRow parameters. I there think I need to do the transformation on the client side. I am able to fetch the rows into the client but I am unsure on how to make the paging mechanism work since I fetch using the data source rather than the ListGrid and therefore don't have a ResultSet.

    Any thoughts? Do I need to build my own resultSet?

    #2
    What specifically do you mean by this:

    However, the paging mechanism doesn't work because I return more rows than is specified in the startRow and endRow parameters.
    It's perfectly legal to return more rows, the client just handles this transparently. What exactly goes wrong?

    Comment


      #3
      If I have 8 rows that are return by the db search, on the server side I generate 15 "virtual rows" of data and return the data. I only see 8 virtual rows in the ListGrid. I did not change startRow, endRow or in the response message.

      So I actually want to page through the physical rows in the database but return a variable number of rows. So say my page size was 8.
      The first query would set startRow to 1 and endRow to 8. I would return
      15 items, the user would scroll to the next page and the ListGrid would call for row 9-18 from the database and I would return say 14 items this time. So the paging is relative to the real rows? I am probably really confused and not
      thinking about this correctly....

      Comment


        #4
        Ah. Well the question basically comes down to: once you've got some of the virtual rows loaded into the grid and it's requesting more rows, do you have an algorithm for translating the virtual row range the ListGrid needs to the physical row range in your DB? Because you need to know what physical row to start generating more virtual rows from.

        Comment


          #5
          I can assign a fixed number say for every row in the real db I will produce 4 virtual rows. What do I need to set endRow and startRow to to produce the correct results?

          Actually, I guess I could just divide the incoming startRow by 4 to get the physical row to start and return pagesize number of rows.

          Originally posted by Isomorphic
          Ah. Well the question basically comes down to: once you've got some of the virtual rows loaded into the grid and it's requesting more rows, do you have an algorithm for translating the virtual row range the ListGrid needs to the physical row range in your DB? Because you need to know what physical row to start generating more virtual rows from.

          Thanks for you help on this one.

          Comment

          Working...
          X