0

Hi

I am unable to update the gridview because it is interfering with the footer textboxes. Can I know how to disable the footer when i click on edit button, so that it can update

<asp:GridView ID="GV_Money" DataKeyNames="ID" ShowFooter="true" runat="server" DataSourceID="SqlDataSource1"
AlternatingRowStyle-BackColor="AliceBlue" AutoGenerateColumns="False">
<RowStyle CssClass="test" />
<Columns>
<asp:CommandField EditText="&nbsp;Edit&nbsp;" ShowEditButton="true" />
<asp:CommandField DeleteText="&nbsp;Delete&nbsp;" ShowDeleteButton="True" />
<asp:TemplateField HeaderText="Open_txt">
<EditItemTemplate> <asp:TextBox ID="tb_Open_txt_1" runat="server" Text='<%# Eval("Open_txt") %>'></asp:TextBox> </EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lb_Open_txt" runat="server" Text='<%# Eval("Open_txt") %>'></asp:Label>
</ItemTemplate>
<FooterTemplate>
<asp:TextBox ID="tb_Open_txt" runat="server"></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<asp:Button ID="b_Submit" runat="server" Text="Submit" OnClick="b_Submit_Click" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" SelectCommand="Select * from Money_table"
InsertCommand="Insert" InsertCommandType="StoredProcedure" UpdateCommand="update"
DeleteCommand="Delete"
UpdateCommandType="StoredProcedure" ConnectionString="">
<InsertParameters>
<asp:Parameter Type="String" Name="Open_txt"></asp:Parameter>
</InsertParameters>
<UpdateParameters>
<asp:Parameter Type="Int32" Name="ID"></asp:Parameter>
<asp:Parameter Type="String" Name="Open_txt"></asp:Parameter>
</UpdateParameters>
</asp:SqlDataSource>

Edited by manjunath_praj: n/a

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by padtes
0

Depending on events (like _RowCancelingEdit or _RowEditing) you want to use true or false for ShowFooter.

gv_Money.ShowFooter = false;

Please mark as solved if this is sufficient.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.