Do I have to Fill Dataset everytime I click on "Ne

Thoz

New Member
Hello,<BR> I am writing a webform application and am using datagrid to show the customer records. I have also included paging mechanism of datagrid. Now whenever I click on next page, I have to call DataBind() method of datagrid, which is fine. But do I really need to fill dataset again using DataAdapater and reassign the data source property of datagrid? What I think is that the dataset is already populated and there's no need to call fill method. It's not working this way.. Any answers?<BR><BR>Thanks<BR>There's a walkthrough on paging with a datagrid on the MS site plus a great review of the control on 4guys (parts 1,2,3). When you implement paging try using the TOP NN feature of your select query so you only get the number of items you need for each page. That way you aren't loading tons of data each time you refresh. You need to do the refresh each time unless you store the contents of your dataset in a Sesssion variable and refernece this each time.<BR><BR>I.e. Session("datasetname")= datasetname
 
Back
Top