asp:GridView的EditItemTemplate怎样显示?
<asp:GridViewID="GrvOperPlans"runat="server"DataSourceID="OperPlans"AutoGenerateColum...
<asp:GridView ID="GrvOperPlans" runat="server" DataSourceID="OperPlans"
AutoGenerateColumns="false" ShowFooter="true"
OnRowCommand="Grv_RowCommand"
OnRowDeleting="Grv_RowDeleting"
OnRowUpdating="Grv_RowUpdating">
<Columns>
<asp:TemplateField HeaderText="ID">
<EditItemTemplate>
<asp:Label ID="LblPlanNo" runat="server" Text='<%# Bind("PLAN_NO") %>'></asp:Label>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LblPlanNo" runat="server" Text='<%# Bind("PLAN_NO") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:Label ID="LblNew" runat="server" Text="追加"></asp:Label>
</FooterTemplate>
<asp:TemplateField ShowHeader="False">
<EditItemTemplate>
<asp:Button ID="BtnUpdate" runat="server" CausesValidation="true" CommandName="Update"
Text="更" ValidationGroup="UpdateData"/>
<asp:Button ID="BtnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
Text="取" />
</EditItemTemplate>
<ItemTemplate>
<asp:Button ID="BtnEdit" runat="server" CausesValidation="False" CommandName="Edit"
Text="编" />
<asp:Button ID="BtnDelete" runat="server" CausesValidation="False" CommandName="Delete"
Text="删" />
</ItemTemplate>
<FooterTemplate>
<asp:Button ID="BtnInsert" runat="server" CommandName="Insert"
Text="追加" ValidationGroup="InsertData"/>
</FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
我想在点击编辑按钮BtnEdit的时候显示EditItemTemplate应该怎么写?
谢谢 展开
AutoGenerateColumns="false" ShowFooter="true"
OnRowCommand="Grv_RowCommand"
OnRowDeleting="Grv_RowDeleting"
OnRowUpdating="Grv_RowUpdating">
<Columns>
<asp:TemplateField HeaderText="ID">
<EditItemTemplate>
<asp:Label ID="LblPlanNo" runat="server" Text='<%# Bind("PLAN_NO") %>'></asp:Label>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="LblPlanNo" runat="server" Text='<%# Bind("PLAN_NO") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:Label ID="LblNew" runat="server" Text="追加"></asp:Label>
</FooterTemplate>
<asp:TemplateField ShowHeader="False">
<EditItemTemplate>
<asp:Button ID="BtnUpdate" runat="server" CausesValidation="true" CommandName="Update"
Text="更" ValidationGroup="UpdateData"/>
<asp:Button ID="BtnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
Text="取" />
</EditItemTemplate>
<ItemTemplate>
<asp:Button ID="BtnEdit" runat="server" CausesValidation="False" CommandName="Edit"
Text="编" />
<asp:Button ID="BtnDelete" runat="server" CausesValidation="False" CommandName="Delete"
Text="删" />
</ItemTemplate>
<FooterTemplate>
<asp:Button ID="BtnInsert" runat="server" CommandName="Insert"
Text="追加" ValidationGroup="InsertData"/>
</FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
我想在点击编辑按钮BtnEdit的时候显示EditItemTemplate应该怎么写?
谢谢 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询