Announcement

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

    Bug in listgrid summary row

    Hello,

    I found a bug regarding Listgrid summary row.
    The row numbers and checkbox are shown in summarygrid row too.
    This happens ONLY when I set a summaryrowdatasource.

    Here is my code
    Code:
     ListGrid listGrid = new ListGrid();
            listGrid.setDataSource(DataSource.get("country"));
            listGrid.setWidth(600);
            listGrid.setHeight(1020);
            listGrid.setAutoFetchData(true);
            listGrid.setShowGridSummary(true);
            listGrid.setShowRowNumbers(true);
            listGrid.setSelectionType(SelectionStyle.SIMPLE);
            listGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
            listGrid.setSummaryRowDataSource(DataSource.get("country"));
    Code:
      <fields>
      <field name="countryId" type="number" primaryKey="true" hidden="false"/> 
      <field name="countryName" type="text"/> 
      </fields>
    SmartgwtVersion: 3.0p.2012-03-09
    browser: firefox 10

    #2
    Thanks for the report - we've addressed this in 3.0p and 3.1d and the fixes will appear in nightly builds after today.

    Comment


      #3
      Thanks for the answer.

      On the similar note, found one more bug:

      SummaryDataSource row is always fetched twice for every single listgrid fetch.
      Why is this behaviour occuring? any inputs?

      Thanks in advance.

      Comment


        #4
        This one is also now fixed in 3.0p and 3.1d - you should see the changes in nightly builds from tomorrow.

        Comment


          #5
          How can I manipulate response sent by summaryRowDataSource?
          As I use
          Code:
          listGrid.setSummaryRowDataSource(ds)
          How to make an explicit call fetchData on this summaryRowDataSource and set response to summaryrow?

          Comment


            #6
            Call ListGrid.recalculateGridSummary - this will cause a new fetch to the summaryRowDataSource.

            Comment


              #7
              I dont want to do a new fetch. I want to acess DSResponse from summaryRowDataSource and format Records and reset to summary.

              Like in a normal fetch
              Code:
               ds.fetchData(null, new DSCallback() {
                          @Override
                          public void execute(DSResponse response, Object rawData, DSRequest request) {
              //Manipulate DSResponse
              }
              But I dont understand how to do this with summaryRowDataSource

              Comment


                #8
                If you need to do formatting of values after they are received from the server and before they are shown in the grid, add a transformResponse() override on the summaryDataSource.

                Comment


                  #9
                  Thank you. It worked :)

                  Comment

                  Working...
                  X