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
Post a Comment