Announcement

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

    How can I scroll through my ListGrid with my PHP Application (pagination)?

    Hello,
    I'm checking if I could use the ListGrid for my PHP Application.

    Is there anywhere an example how I can scroll through my grid WITHOUT requesting all rows from the server at once - something like pagination?

    How can I send the parameters like "start, limit, sort, dir" to the server and what response format expects the client? Unfortunately I'm not a JAVA expert.


    Code:
      // With the following code I get unfortunately all records at once.
      isc.DataSource.create({
        ID:"projectListDs",
        dataFormat:"json",
        dataURL:"project/list.json",
        fields:[
            {title:"#", name:"id"},
            {title:"Name", name:"name"}
        ]
      });
    
      isc.ListGrid.create({
        ID:"projectList",
        dataSource:"projectListDs",
        useAllDataSourceFields:true,
        autoFetchData: true,
        alternateRecordStyles:true
      });
    
      // My Server answers
      // [{"id":"1","name":"test"},{"id":"2","name":"real"}]
    Thank you

    #2
    I was able to resolve the problem for myself.
    http://www.smartclient.com/docs/6.5....RestDataSource
    thx

    Comment

    Working...
    X