绑定ItemTemplate,EditItemTemplate,FooterTemplate

 <asp:TemplateField HeaderText="编辑/新增">
         <HeaderStyle Font-Size="11pt" Height="30px" HorizontalAlign="Center" VerticalAlign="Middle"></HeaderStyle>
         <ItemStyle Font-Size="10pt" Height="30px" HorizontalAlign="Center" VerticalAlign="Middle" ></ItemStyle>
         <ItemTemplate>
          <asp:ImageButton id="Imagebutton3" runat="server" CommandName="Edit" ImageUrl="~/images/btnEditS.gif"
           AlternateText="编辑"></asp:ImageButton>
         </ItemTemplate>
         <FooterStyle Font-Size="10pt" Height="30px" Width="100px" HorizontalAlign="Center" VerticalAlign="Middle"></FooterStyle>
         <FooterTemplate>
          <asp:ImageButton id="ImageButton1" runat="server" CommandName="Insert" ImageUrl="~/images/btnInS.gif"></asp:ImageButton>
         </FooterTemplate>
         <EditItemTemplate>
          <asp:LinkButton id="LinkButton3" runat="server" CommandName="Update" Text="更新" ></asp:LinkButton>
          <asp:LinkButton id="LinkButton2" runat="server"  CommandName="Cancel" Text="取消" ></asp:LinkButton>
         </EditItemTemplate>
        </asp:TemplateField>
       

<asp:TemplateField HeaderText="打色次数">
         <ItemTemplate>
          <asp:Label ID="Labe3" runat="server" Text='<%# Eval("color_count") %>'>
          </asp:Label>
         </ItemTemplate>
         <FooterStyle Width="100px" HorizontalAlign="Center" VerticalAlign="Middle"></FooterStyle>
         <FooterTemplate>
          <asp:TextBox Runat="server" Visible="false" Width="100" ID="color_count"></asp:TextBox>
         </FooterTemplate>
         <EditItemTemplate>
          <asp:TextBox runat="server"  ID="edit_color_count" Text='<%# Eval("color_count") %>'>
          </asp:TextBox>
         </EditItemTemplate>
                                    <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                    <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
        </asp:TemplateField>  

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值