DataGrid

前台:

<asp:DataGrid ID="dg_List" runat="server"  CssClass="DBGrid_table" AllowSorting="True" PageSize="20" CellPadding="3"  >
	<AlternatingItemStyle CssClass="DBGrid_AlternatingItem" />  <!-- 交替行样式 -->
	<ItemStyle CssClass="DBGrid_Item" />
	<HeaderStyle CssClass="DBGrid_Head" ForeColor="White" />
	<Columns >
    <asp:BoundColumn DataField="EvaluateType" SortExpression="EvaluateType" HeaderText="客户评价">
	<!-- DataField: 绑定字段名, SortExpression: 排序字段名 -->
		<HeaderStyle CssClass="DBGrid_td" />  <!-- 数据绑定行 -->
		<ItemStyle CssClass="DBGrid_td" />		<!-- 内容样式 -->
	</asp:BoundColumn>
	<asp:TemplateColumn HeaderText="操作">
		<HeaderStyle CssClass="DBGrid_td" />	<!-- 页首样式 -->
		<ItemStyle CssClass="DBGrid_td" />		<!-- 内容样式 -->
		<ItemTemplate>
			<a href="#" onclick="detailModify('<%# DataBinder.Eval(Container.DataItem, "ID")%>')" style="color: #428EFF; text-decoration: underline;">修改</a>
		</ItemTemplate>
	</asp:TemplateColumn>
	</Columns>
</asp:DataGrid>
posted @ 2011-06-29 14:20  hen  阅读(195)  评论(0编辑  收藏  举报