Announcement

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

    Client Filters in exportData not respected

    We are currently using exportData to export xls . when we use this exportData() client side filters are not respected is there a way we can able to get the client filters applied to exportData()

    which also impacted xml,csv download

    we are using SmartClient Ajax RIA system Version v12.1p_2021-05-18/PowerEdition Deployment (2021-05-18)

    Last edited by kmbilal; 10 Jun 2021, 06:07.

    #2
    listGrid.exportData() uses the criteria currently applied to the grid. DataSource.exportData() does not (since there's no grid) so you are probably just calling the wrong API.

    Comment


      #3
      we are using listGrid in SmartClient below the sample code.

      _gridObject = isc.ListGrid.create({

      ID : "PSC_Grid_" + _uuid,

      dataSource : _dsObject,

      dataFetchMode : "local",
      }
      ..........
      .......

      });



      exportOpts = {

      exportAs : "ooxml",

      exportDisplay : "download",

      exportFilename : EXPORT_FILENAME + ".xlsx",

      message : "Excel",

      exportTZ : "client"

      };

      _gridObject.exportData(exportOpts);

      Comment


        #4
        Why are you using dataFetchMode:"local"? Only works for small amounts of data, generally causes unnecessary server load. Try removing that and using the default.

        Comment


          #5
          i have removed dataFetchMode from the ListGrid.But Still Same Issue all records are downloading instead only the filtered records.is there any specific settings i need to do ?

          Comment


            #6
            No. You can see this working in many Showcase examples. Let us know if you can find a way to reproduce the problem, as a minimal, ready-to-run test case.

            Comment


              #7
              i can able to see the AdvancedCriteria values in DSRequest in server side DataSource is there a way i can apply that to result ?

              we generate result from some service method and set the result in the DSResponse using setData() is there a way we can apply the AdvancedCriteria to this result so that i can apply the filtered result to setData()

              something like this in our CustomDataSource which extends BasicDataSource


              @Override

              public DSResponse executeFetch(DSRequest req) throws Exception {

              DSResponse res = getDSResponse();

              List resultsToReturn = new ArrayList();

              //some operation to get the result
              //resultsToReturn = some operation to get the result

              res.setStatus(DSResponse.STATUS_SUCCESS);
              res.setData(resultsToReturn);
              return res;

              }

              looking for some utility method with we pass result list and criteria which gives back us the filtered result.i don't see any sample smartclient example have this implemented.if any please update will check the doc.

              will prepare sample and update thanks for your support.
              Attached Files
              Last edited by kmbilal; 11 Jun 2021, 07:50.

              Comment

              Working...
              X