asp.net - Grid view values are not binding when paginate -


in below code have grid when try paginate throws page index changing error tried fix issue.but when paginate not binding values.so me solve issue.

<asp:gridview   onpageindexchanging="grdsrchlst_pageindexchanging" id="grdsrchlst" runat="server"  pagerstyle-mode="numericpages" pagesize="10" pagerstyle-visible="true"  autogeneratecolumns="false" allowpaging="true"> </asp:gridview>  

code:

protected void grdsrchlst_pageindexchanging(object sender, gridviewpageeventargs e) {     grdsrchlst.pageindex = e.newpageindex;     searchinformation(datatable dtsearch); //throws error ...i cant bind value when paginate }  public void searchinformation(datatable dtsearch) {      grdsrchlst.datasource = dtsearch;     grdsrchlst.databind(); } 

try shown in article:

http://www.c-sharpcorner.com/uploadfile/rohatash/gridview-paging-sample-in-asp-net/


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -