Announcement

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

    listgrid.setDataPageSize(30) property not fetching specified records in the first request.

    Dear Isomorphic,

    Thank you for your support.

    1. We are facing an issue with "setDataPageSize" property. We specified "setDataPageSize" property value as "30". In our database there are around 150 records are there.
    2. In the First request it is fetching 45 records(the count is changing based on window resolution).
    3. From the second request onward it is fetching proper record count(30) which i have specified in the "setDataPageSize" property.
    Example: 1st request : 45 >>> Count should be 30 not 45.
    2nd request : 30
    3rd request : 30 etc..

    Could you please let us know if any solution is available to fix this issue.

    --------------------------------------------------------------
    sample Code:

    ListGrid countryGrid = new ListGrid();
    countryGrid.setAutoFetchData(true);
    countryGrid.setDataFetchMode(FetchMode.PAGED);
    countryGrid.setWidth100();
    countryGrid.setHeight100();
    countryGrid.setMargin(10);
    countryGrid.setLeaveScrollbarGap(false);
    countryGrid.setWrapHeaderTitles(true);
    countryGrid.setWrapCells(true);
    countryGrid.setAutoFitHeaderHeights(true);
    countryGrid.setShowRollOver(false);
    countryGrid.setShowFilterEditor(false);
    countryGrid.setCanAutoFitFields(true);
    countryGrid.setCanResizeFields(true);
    countryGrid.setFixedRecordHeights(false);
    countryGrid.setAllowFilterOperators(false);
    countryGrid.setSelectionType(SelectionStyle.SIMPLE);
    countryGrid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
    countryGrid.setAutoFitWidthApproach(AutoFitWidthApproach.BOTH);
    countryGrid.setShowEmptyMessage(true);
    countryGrid.setShowFilterEditor(false);
    countryGrid.setFilterOnKeypress(true);
    countryGrid.setWarnOnRemoval(true);
    countryGrid.setShowRecordComponents(true);
    countryGrid.setShowRecordComponentsByCell(true);
    countryGrid.setCellHeight(30);
    countryGrid.setHeaderHeight(30);
    countryGrid.scrollToRow(0);
    countryGrid.setDataPageSize(30);
    countryGrid.setDataSource(DataSource.get("worldDS"));
    countryGrid.draw();
    -------------------------------------


    Thank in advance.

    Smart GWT Version: 12 pro
    Google chrome version: Version 65.0.3325.162 (Official Build) (64-bit).
    Last edited by vnathank; 18 Jun 2018, 07:34.

    #2
    This is correct behavior and is as designed. dataPageSize serves as a minimum, but a large grid may need to fetch more rows than the page size in order to fill the viewport (plus the drawAheadRatio area).

    As we've covered in other threads, you need to fix your server so that it can return arbitrary row ranges. Playing around with client-side properties to try to get *all* requests to fall on specific row boundaries will not work, and continues to be a waste of your time and ours.

    Comment


      #3
      Dear Isomorphic,

      Thank you for sharing the information.

      Comment

      Working...
      X