日期:2014-05-17 浏览次数:20437 次
<asp:DataGrid ID="dg2" runat="server" AutoGenerateColumns="False" DataKeyField="sid" HorizontalAlign="Center" Width="600px" AllowPaging="True" AllowSorting="True" OnPageIndexChanged="dg2_PageIndexChanged" OnCancelCommand="dg2_CancelCommand" OnDeleteCommand="dg2_DeleteCommand" OnEditCommand="dg2_EditCommand" OnUpdateCommand="dg2_UpdateCommand" OnItemCommand="dg2_ItemCommand" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Horizontal" style="font-family: 微软雅黑; font-size: small; text-align: center;"> <FooterStyle BackColor="#CCCC99" ForeColor="Black" /> <HeaderStyle HorizontalAlign="center" BackColor="#333333" ForeColor="white" Font-Bold="True" /> <PagerStyle HorizontalAlign="Right" Font-Size="small" BackColor="White" ForeColor="Black"/> <Columns> <asp:BoundColumn HeaderText="2级目录名称" DataField="sname"></asp:BoundColumn> <asp:EditCommandColumn EditText="编辑" CancelText="取消" UpdateText="更新" HeaderText="功能" ItemStyle-HorizontalAlign="center" CausesValidation="false"> <ItemStyle HorizontalAlign="Center"></ItemStyle> </asp:EditCommandColumn> <asp:ButtonColumn Text="删除" HeaderText="功能" CommandName="del" CausesValidation="false" ItemStyle-HorizontalAlign="center" > <ItemStyle HorizontalAlign="Center"></ItemStyle> </asp:ButtonColumn> </Columns> </asp:DataGrid>