Announcement

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

    Questions about record count in listgrid

    2 questions:

    1) I am trying to get a count of the records in a ListGrid that is grouped. I am probably using the wrong method (listGrid.getDataAsRecordList().getLength()), however - it appears to me that this includes groups as a 'record'. I want the count of actual records.

    2) I am also using listGrid.setShowRowNumbers(true), which I would assume to number the records consecutively, however the records are numbered as if groups are also records.

    I attached a test case which I believe shows what I mean... is there a different way to go about this? Thanks.
    Attached Files

    #2
    2) in the latest nightly the row numbers for a grouped grid now reflect normal records only

    1) the original dataset (ungrouped) is available as grid.originalData, but there's no SGWT wrapper API for this yet. Calling getAttribute("originalData") will give it to you as a JavaScriptObject which you can use to construct a RecordList.

    Comment


      #3
      Hi,

      I am also facing same issue, Could you please let me know the information is available to fix this issue.

      Details:
      using Smart Gwt-4.1p (29th Oct 2014).
      Browser: Google chrome 39.0.2171.95 m, IE8 and IE9

      Comment


        #4
        This thread is very old - getOriginalResultSet().getLength() is a good way to get the total number of records whether grouped or not.

        Comment


          #5
          It looks the grid.getOriginalResultSet().getLength() is not working while we use the Distinct:

          I have create the new Post since its old post
          Last edited by jaikumart; 5 Jan 2016, 12:10.

          Comment

          Working...
          X