How to fetch only limited data from DB(SQL Server) whilst using Data Table?

How to fetch only limited data from DB(SQL Server) whilst using Data Table?

ersatpal127ersatpal127 Posts: 1Questions: 1Answers: 0

I'm intending to do the following :

  • Suppose I have a total of 1000 records in my DB.
  • So when my page is first loaded it should only fetch first 10 records(or first 25 if 25 records are selected and so on) instead of all 1000 records. This would improve the performance.
  • The next 10 records should only be fetched when the user asks for next data to be displayed.

How can I get this done?

I found out about deferLoading and deferRender options but I'm not sure which one is suitable for my case. Are there any other options?

Answers

  • colincolin Posts: 15,144Questions: 1Answers: 2,586

    Hi @ersatpal127 ,

    Yep, that's just standard behaviour for server-side processing, see the example here,

    Cheers,

    Colin

This discussion has been closed.