How does the DataGrid set pagination?

Source: Internet
Author: User
datagrid| paging <asp:datagrid id= "Programmaticid" runat=server<br>
Datasource= ' <%# databindingexpression%> ' <br>
Allowpaging= "true| False "<br>
Allowsorting= "true| False "<br>
Autogeneratecolumns= "true| False "<br>
Backimageurl= "url" <br>
cellpadding= "Pixels" <br>
cellspacing= "Pixels" <br>
Datakeyfield= "Datasourcekeyfield" <br>
Gridlines= "none| horizontal| vertical| Both "<br>
Horizontalalign= "center| justify| Left| Notset| Right "<br>
Pageddatasource<br>
Pagesize= "ItemCount" <br>
Showfooter= "true| False "<br>
Showheader= "true| False "<br>
Virtualitemcount= "ItemCount" <br>
Oncancelcommand= "Oncancelcommandmethod" <br>
Ondeletecommand= "Ondeletecommandmethod" <br>
Oneditcommand= "Oneditcommandmethod" <br>
Onitemcommand= "Onitemcommandmethod" <br>
Onitemcreated= "Onitemcreatedmethod" <br>
Onpageindexchanged= "Onpageindexchangedmethod" <br>
Onsortcommand= "Onsortcommandmethod" <br>
Onupdatecommand= "Onupdatecommandmethod" ><br>
<br>
<alternatingitemstyle property= "Value"/><br>
<edititemstyle property= "Value"/><br>
<footerstyle property= "Value"/><br>
<itemstyle property= "Value"/><br>
<pagerstyle property= "Value"/><br>
<selecteditemstyle property= "Value"/><br>
<br>
</asp:DataGrid><br>
Or<br>
<asp:datagrid id= "Programmaticid" runat=server<br>
Datasource= ' <%# databindingexpression%> ' <br>
autogeneratecolumns= "False" <br>
(Other properties) ><br>
<br>
<alternatingitemstyle property= "Value"/><br>
<edititemstyle property= "Value"/><br>
<footerstyle property= "Value"/><br>
<itemstyle property= "Value"/><br>
<pagerstyle property= "Value"/><br>
<selecteditemstyle property= "Value"/><br>
<br>
<Columns><br>
<asp:BoundColumn<br>
Datafield= "Datasourcefield" <br>
dataformatstring= "FormatString" <br>
footertext= "Footertext" <br>
Headerimageurl= "url" <br>
headertext= "HeaderText" <br>
Readonly= "true| False "<br>
Sortfield= "Datasourcefieldtosortby" <br>
Visible= "true| False "<br>
footerstyle-property= "Value" <br>
headerstyle-property= "Value" <br>
itemstyle-property= "Value"/><br>
<br>
<asp:ButtonColumn<br>
Buttontype= "linkbutton| Pushbutton "<br>
Command= "Bubbletext" <br>
Datatextfield= "Datasourcefield" <br>
datatextformatstring= "FormatString" <br>
footertext= "Footertext" <br>
Headerimageurl= "url" <br>
headertext= "HeaderText" <br>
Readonly= "true| False "<br>
Sortfield= "Datasourcefieldtosortby" <br>
text= "Buttoncaption" <br>
Visible= "true| False "/><br>
<br>
<asp:EditCommandColumn<br>
Buttontype= "linkbutton| Pushbutton "<br>
canceltext= "Cancelbuttoncaption" <br>
edittext= "Editbuttoncaption" <br>
footertext= "Footertext" <br>
Headerimageurl= "url" <br>
headertext= "HeaderText" <br>
Readonly= "true| False "<br>
Sortfield= "Datasourcefieldtosortby" <br>
updatetext= "Updatebuttoncaption" <br>
Visible= "true| False "/><br>
<br>
<asp:HyperLinkColumn<br>
Datanavigateurlfield= "Datasourcefield" <br>
datanavigateurlformatstring= "Formatexpression" <br>
Datatextfield= "Datasourcefield" <br>
datatextformatstring= "Formatexpression" <br>
footertext= "Footertext" <br>
Headerimageurl= "url" <br>
headertext= "HeaderText" <br>
Navigateurl= "url" <br>
Readonly= "true| False "<br>
Sortfield= "Datasourcefieldtosortby" <br>
target= "Window" <br>
text= "Hyperlinktext" <br>
Visible= "true| False "/><br>
<br>
<asp:TemplateColumn<br>
footertext= "Footertext" <br>
Headerimageurl= "url" <br>
headertext= "HeaderText" <br>
Readonly= "true| False "<br>
Sortfield= "Datasourcefieldtosortby" <br>
Visible= "true| False "><br>
<br>
<HeaderTemplate><br>
Header Template html<br>
<ItemTemplate><br>
ItemTemplate html<br>
</ItemTemplate><br>
<EditItemTemplate><br>
EditItem Template html<br>
</EditItemTemplate><br>
<FooterTemplate><br>
Footer Template html<br>
</FooterTemplate><br>
<br>
</asp:TemplateColumn><br>
</Columns><br>
<br>
</asp:DataGrid>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.