asp.net - ListView DataPager is not working -
i have listview datapager
<asp:listview id="profileslist" runat="server" onitemdatabound="profileslist_databound" > <layouttemplate> <asp:datapager runat="server" id="contactsdatapager" pagesize="12"> <fields> <asp:nextpreviouspagerfield showfirstpagebutton="true" showlastpagebutton="true" firstpagetext="|<< " lastpagetext=" >>|" nextpagetext=" > " previouspagetext=" < " /> </fields> </asp:datapager> <table cellpadding="0" cellspacing="0" class="gridbody" style="padding:0; width:910px; border-bottom-style:none;"> <tr class="gridheader" style="text-align:center;"> <td style="width:8px; padding-left:5px; border-bottom-style:none; "> </td> <td style="width:274px; border-bottom-style:none;"> person info </td> <td style="width:273px; border-bottom-style:none;"> company info </td> <td style="width:272px; border-bottom-style:none;"> user attributes </td> </tr> </table> <asp:placeholder id="itemplaceholder" runat="server"></asp:placeholder> </div> </layouttemplate>
keep in mind first bit of listview whole thing huge.
anyways buttons appear, not @ all....do have in code behind?
extract datapager listview, set pagedcontrolid property , implement pagepropertieschanging method:
//set current page startindex, max rows , rebind false contactsdatapager.setpageproperties(e.startrowindex, e.maximumrows, false); //rebind list view bindlistview();
take @ @ article: http://dotnet.dzone.com/articles/paging-listview-using
asp.net listview datapager
No comments:
Post a Comment