Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7573581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T16:13:06+00:00 2026-05-30T16:13:06+00:00

I am using a GridView within an updatepanel. I have gridview generated edit and

  • 0

I am using a GridView within an updatepanel.
I have gridview generated edit and cancel buttons.

The first time I click edit, the gridview edit template displays fine. Then if I click cancel, or edit on another row, nothing happens. It seems that the update panel has ceased to work.

If I do the same thing without the update panel the postback works fine and the gridview does what it should (although it’s quite cumbersome as it refreshes the whole page, which is why I want to use the updatepanel!)

        <asp:UpdatePanel ID="upSentOrders" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:GridView ID="gvSentOrders" runat="server"
                        autogeneratecolumns="False"
                        allowpaging="false" 
                        DataKeyNames="titxn_id" 
                        AlternatingRowStyle-CssClass="gvAlternate"                  
                        CssClass="gvTable" 
                        OnRowDataBound="addSentTotals" 
                        OnRowEditing="editOrder" 
                        OnRowCancelingEdit="cancelEdit"     
                        OnDataBound="showSentTotals"                    
                        AutoGenerateEditButton="true" 
                        AutoGenerateDeleteButton="false" 
                        ShowFooter="true" 
                        ShowHeader="true">
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            <table class="basketHeader">
                                <tr>
                                    <td class="basketTitle"><asp:Label ID="lblTitle" runat="server" Text="Order Date" /></td>
                                    <td class="basketPX"><asp:Label ID="lblPXOffer" runat="server" Text="Part Ex" /></td>
                                    <td class="basketCash"><asp:Label ID="lblCashOffer" runat="server" Text="Cash" /></td>
                                    <td class="basketDelete">&nbsp;</td>
                                </tr>                                
                            </table>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <table class="basket">
                                <tr>
                                    <td class="basketTitle"><asp:Label ID="lblTitle" runat="server" Text='<%# String.Format("{0:dd MMMM yyyy}", Eval("titxn_date")) %>' /></td>
                                    <td class="basketPX"><asp:Label ID="lblPXOfferItem" runat="server" Text='<%# "£" + Eval("titxn_totalpxatsend") %>' /></td>
                                    <td class="basketCash"><asp:Label ID="lblCashOfferItem" runat="server" Text='<%# "£" + Eval("titxn_totalcashatsend") %>' /></td>
                                    <td class="basketDelete"><asp:Button ID="btnEdit" Text="" CommandArgument="1" runat="server" CssClass="editButton" ToolTip="View Order" OnClick="viewOrder" /></td>
                                </tr>                                
                            </table>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <table class="basket">
                                <tr>
                                    <td class="basketTitle"><asp:Label ID="lblTitle" runat="server" Text='<%# String.Format("{0:dd MMMM yyyy}", Eval("titxn_date")) %>' /></td>
                                    <td class="basketPX"><asp:Label ID="lblPXOfferItem" runat="server" Text='<%# "£" + Eval("titxn_totalpxatsend") %>' /></td>
                                    <td class="basketCash"><asp:Label ID="lblCashOfferItem" runat="server" Text='<%# "£" + Eval("titxn_totalcashatsend") %>' /></td>
                                    <td class="basketDelete"><asp:Button ID="btnStopEdit" Text="" CommandArgument="-1" runat="server" CssClass="stopEditButton" ToolTip="View Order" OnClick="viewOrder" /></td>
                                </tr>                                
                                <tr>
                                    <td colspan="4">
                                        Items GridView here...
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="4">
                                        <asp:Label ID="lblAddress" runat="server" Text='<%# Eval("titxn_name") + ", " + Eval("titxn_addressnumber") + " " + Eval("titxn_addressone") + ", " + Eval("titxn_addresstown") + ", " + Eval("titxn_addresscounty") + ", " + Eval("titxn_addresscountry") + ", " + Eval("titxn_addresspostcode") + "." %>' />   
                                    </td>
                                </tr>
                            </table>                        
                        </EditItemTemplate>
                        <FooterTemplate>
                            <table class="basketTotals">
                                <tr>
                                    <td class="basketTitle">Total Still To Arrive</td>
                                    <td class="basketPX"><asp:Label ID="lblPxTotal" runat="server" Text="" /></td>
                                    <td class="basketCash"><asp:Label ID="lblCashTotal" runat="server" Text="" /></td>
                                    <td class="basketDelete">&nbsp;</td>
                                </tr>                                
                            </table>                  
                        </FooterTemplate>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    <p>There is no orders still being processed.  Look like we've already completed all the orders you've sent us!</p>
                </EmptyDataTemplate>
            </asp:GridView>    
        </ContentTemplate>
    </asp:UpdatePanel>

Code behind….

protected void editOrder(object sender, GridViewEditEventArgs e)
{
    gvSentOrders.EditIndex = e.NewEditIndex;
    bindSentGridView();
}

protected void cancelEdit(object sender, GridViewCancelEditEventArgs e)
{
    gvSentOrders.EditIndex = -1;
    bindSentGridView();
}

Any thoughts would be a great help.
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T16:13:08+00:00Added an answer on May 30, 2026 at 4:13 pm

    It was a JS error from another bit of code that stopped the AJAX updating the panel.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the ASP net Ajax toolkit and have a GridView within the UpdatePanel
I am using gridView. I have 4 auto generated columns and 1 generated by
I have a GridView which is continually rebound using a timer and is within
I have been using gridview since a long time. I have a cant live
I am using Gridview with Edit option. When i click on Edit button row
I have a DevExpress gridView within an asp updatePanel. <asp:ScriptManager ID=ScriptManager1 runat=server /> <asp:UpdatePanel
I am using c#.net. Within my Gridview I am trying to set the SelectedRowStyle
Hi i m using GridView with hovermenu and i want that when we click
I have followed Custom Pagination article to implement the custom pagination using GridView. I
I have a ListView which is using a GridView to display a DataTable and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.