<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>
<HeaderStyle 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>
<HeaderStyle 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>