Announcement

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

    Listgrid - load on demand

    Hello,

    I have a grid that shows around 20k-25k records. I want to do something like it is done on Live Grid example, but it doesn't seem to be working. When i get to the end of the grid, it doesn't load the other records ( i have limited to 75 ).

    Is there any additional parameter that i should set?


    Grid code:

    Code:
    isc.ListGrid.create(
    {  
       "ID":"subscribersGrid",
       "width":750,"height":300,
       "fields":null,
       "dataSource":subscribersDS,
       "canEdit":false,
       "showFilterEditor":true,
       "autoFetchData":true}
    );
    Datasource code:

    Code:
    isc.RestDataSource.create(
    {
            "ID":"subscribersDS",
            "dataFormat":"json",
            "fields":[{"name":"id","title":"ID","primaryKey":true,"foreignKey":null,"rootValue":null,"canEdit":false},
       {"name":"email","title":"Email","primaryKey":false,"foreignKey":"","rootValue":0,"canEdit":true},
             "operationBindings": [{"dataURL":"index.php?page_name=subscribers&act=sc_list&type=activated","operationType":"fetch"}],
             "dataProtocol":"postParams"
    });
    Example of response:

    Code:
    {"response": 
       {
              "startRow":0,
              "endRow":75,
              "totalRows":20000,
              "status":0,
              "data": [{
                     // 75 records...
              }]
    }}

    #2
    Hi,

    just try to add

    dataPageSize:75,
    drawAheadRatio:4

    to your listgrid definition.

    Comment


      #3
      That part of your code is fine. Something else is wrong, in code you aren't showing. Try isolating the issue to a minimal test case.

      Comment

      Working...
      X