smart paging with datagrid

后端 未结 3 1307
暖寄归人
暖寄归人 2021-01-23 21:08

How do I configure my datagrid to use paging such that it won\'t pull ALL the rows from the database, but rather only the rows for the current page.

BTW, should I be usi

3条回答
  •  逝去的感伤
    2021-01-23 21:55

    When I've implemented paging like this in the past, you can push the responsability on to SQL to do the paging assuming you tell it to the page number and size. This is dependant on the type of database your running.

    Doing it on SQL Server 2000 is a litle complex but if your using that, I might have resources that I can dig out

    Paging in SQL Server 2005 / 2008 is very easy.

    As for how do you tell the DB, that depends on how your binding to your grid, and how your pulling your data.

提交回复
热议问题