Intersoft Support Center

Implement Custom Load-on-Demand Paging

WebGrid enables user to apply custom Load-On-Demand paging.

In this topic, you will learn how to implement custom Load-On-Demand Paging.

To implement custom Load-On-Demand Paging

  1. Bind WebGrid to ISDataSource (Using Customers table).
  2. Open WebGrid Designer. Click See all Properties and set PagingMode to VirtualLoad, VirtualLoadMode to Custom.
  3. Open ISDataSource Designer. Go to Tables and select Customers.
  4. Set EnablePaging to True, MaximumRowsParameterName to maximumRows, SelectCountMethod to SelectCount and StartRowIndexParameterName to startRowIndex.
  5. You need to prepare two method with the correct parameter in DAL :
    • Select Method with 3 parameters : startRowIndex, maximumRows, and sortExpression.
      e.g : public DataTable GetData(int startRowIndex, int maximumRows, string sortExpression)
    • SelectCount Method with 1 parameter : sortExpression
      e.g : public int SelectCount(string sortExpression)
Previous Next