How does the DataGrid set pagination?
Last Update:2017-02-28
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>