asp.net - how to make Repeater Results as different pages -
datatable newdt = new datatable(); newdt = datasethelper.join(ds.tables["unit"], ds.tables["location"], new datacolumn[] { ds.tables["unit"].columns["location_id"] }, new datacolumn[] { ds.tables["location"].columns["location_id"] }, "locationname"); dataview dv = ds.tables["unit"].defaultview; repeater.datasource = dv; repeater.databind();
now results displaying on 1 page, want change different pages.
how can that? please help
update 1
dv.sort = sortlist.selectedvalue.tostring(); pageddatasource page = new pageddatasource(); page.datasource = dv; page.allowpaging = true; // page.pagesize = int32.parse(resultlist.selectedvalue); page.pagesize = 10; page.currentpageindex = currentpage; lblcurrentpage.text = "page: " + (currentpage + 1).tostring() + " of " + page.pagecount.tostring(); cmdprev.enabled = !page.isfirstpage; cmdnext.enabled = !page.islastpage; invlist.datasource = dv; invlist.databind();
you can put pagination in repeater
.try link more information
Comments
Post a Comment