asp.net - ASP GridView change through pagination -
this scenario.
i have result set in asp gridview presented on webpage. gridview displayed on screen viewing team needs see information.
however, there lot of rows display, have enabled auto paging keep results on each page...is there way automatically change through pagination?
thanks
code:
partial class _default inherits system.web.ui.page protected sub gridview2_selectedindexchanged(byval sender object, byval e system.eventargs) handles gridview2.selectedindexchanged end sub protected void gridview1_pageindexchanging(object sender, gridviewpageeventargs e) { gridview1.pageindex = e.newpageindex;/* y gridview1.datasource = sqldatasource1 gridview1.databind(); } end class
do want update grid data when user changes pages? if so, should work:
add grid:
onpageindexchanged="gridview1_pageindexchanged"
and code behind:
protected void gridview1_pageindexchanging(object sender, gridviewpageeventargs e) { gridview1.pageindex = e.newpageindex; gridview1.datasource = /* data source */ gridview1.databind(); }
Comments
Post a Comment