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

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -