Intersoft WebGrid Documentation
How-to: Implement Custom Load-On-Demand Paging
See Also Send comments on this topic.

Glossary Item Box

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.NET Designer. Click See all Properties and set PagingMode to VirtualLoad, VirtualLoadMode to Custom.
  3. Open ISDataSource.NET 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)

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.