DataGrid <asp:datagrid><columns></columns></asp:datagrid>
Displays a data list as a HTML table. It has style support and default paging system.
Properties:
Id=”results” Runat=”server” BackColor=”#f6f6da” Cellspacing=”2” Cellpadding=”2” Width=”500” Height=”500” HorizontalAlign=”center/right” GridLines=”both/none/vertical/horizontal” BorderWidth=”1” BorderColor=”#000000” ShowHeader=”false/true” AlternatingItemStyle-BackColor=”#f6f6da” AutoGenerateColumns="true/false" AllowPaging="true/false" PageSize="2" PagerStyle-Mode="NumericPages" PagerStyle-HorizontalAlign="center/right" PagerStyle-PageButtonCount="5" |
Creates an unique identifier |
Template Column <asp:templatecolumn></asp:templatecolumn>
Determines the area where custom columns can be created.
Example:
<asp:templatecolumn>
<headertemplate>………</headertemplate>
<itemtemplate>………</itemtemplate>
<footertemplate>………</footertemplate>
</ asp:templatecolumn>
Properties:
DataField=”pid” Visible=”true/false” HeaderText=”Product ID” HeaderStyle-HorizontalAlign=”left” ItemStyle-HorizontalAlign=”center” |
Sets the column table (Data table) to display |
Bound Column <asp:boundcolumn/>
Creates a column that outputs a single value.
Example:
<asp:boundcolumn DataField=”Pname” HeaderText=”Product Name”/>
Properties:
DataField=”pid” Visible=”true/false” HeaderText=”Product ID” HeaderStyle-HorizontalAlign=”left” ItemStyle-HorizontalAlign=”center” |
Sets the column table (Data table) to display |
Repeater <asp:repeater></asp:repeater>
Displays data items in a repeating list. It has no style support and no default paging system.
Example:
<asp:repeater id=”rpt” runat=”server”>
<headerTemplate>….<headerTemplate>
<itemTemplate>….<itemTemplate>
<footerTemplate>….<footerTemplate>
</asp:repeater>