Announcement

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

    ListGrid.fetchData() fires 2 Fetches

    Hi,

    I have a ListGrid which is bound to a remote datasource.
    It has:
    datapagesize = 10.

    The properties sent to the server (via the fetchData method) are:
    startRow = 0
    endRow = 10

    The properties returned to the grid are:
    startRow = 0
    endrow = 2
    totalRows = 2

    The problem is the fetch is fired 2 times instead of just once. I suspect it's because of these settings, however I can't see where/how.

    However I am sure my properties are correct and it is still happening. I've checked everything else and can't figure out why the fetch is firing twice. My grid code follows:

    Code:
    setWidth100();
    setHeight100();
    setMargin(0);
    setShowRecordComponents(true);
    setShowRecordComponentsByCell(true);
    setDataSource(ds); //a typical DataSource
    setDataPageSize(10);
    setFields(fields...);
    fetchData();
    Thanks,
    Alan

    #2
    I think I fixed this.

    The endRow I was using was the total number of records returned. I subtracted one from it and it seems to have fixed it.

    So for a grid with 5 rows, the correct values to set would be:

    startRow = 0
    endRow = 4
    totalRows = 5

    Is that correct?

    Comment

    Working...
    X