日期:2014-05-17 浏览次数:20402 次
<asp:datagrid id="dgVidicon" runat="server" DataKeyField="Id"
oneditcommand="edit" OnCancelCommand="cancel" OnUpdateCommand="update" AllowPaging="True"
PageSize="10" AutoGenerateColumns="False"
PagerStyle-Visible="False">
<SelectedItemStyle BackColor="White"></SelectedItemStyle>
<AlternatingItemStyle BackColor="AliceBlue"></AlternatingItemStyle>
<ItemStyle HorizontalAlign="Left"></ItemStyle>
<HeaderStyle Font-Bold="True" HorizontalAlign="Center" ForeColor="White" VerticalAlign="Middle"
BackColor="SkyBlue"></HeaderStyle>
<Columns>
<asp:BoundColumn DataField="Id" Visible="False">
<ItemStyle Wrap="False"></ItemStyle>
</asp:BoundColumn>
<asp:BoundColumn DataField="TypeName" HeaderText="类型名称">
<HeaderStyle Width="24%"></HeaderStyle>
<ItemStyle Wrap="False" HorizontalAlign="Center"></ItemStyle>
</asp:BoundColumn>
<asp:TemplateColumn HeaderText="类型选项">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem,"TypeValue").ToString()%>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox runat="server" ID="txt_DropItem" />
</EditItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="排序">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem,"Sort").ToString()%>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox runat="server" ID="txt_Sort" />
</EditItemTemplate>
</asp:TemplateColumn>
<asp:ButtonColumn Text="删除" CommandName="Delete">
<HeaderStyle Width="15%"></HeaderStyle>
</asp:ButtonColumn>
<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="更新" CancelText="取消" EditText="编辑">
<HeaderStyle Width="15%"></HeaderStyle>