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 9025147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:11:59+00:00 2026-06-16T06:11:59+00:00

I understand that this is a very common issue, I have been reading documentation

  • 0

I understand that this is a very common issue, I have been reading documentation on it for days, and I am about to pull my hair out over this issue.

BACKGROUND
I have multiple Gridviews inside of an UpdatePanel. What is happening, is someone is importing an Excel spreadsheet, I am using OpenXML to shread the data and store it in a VB.NET datatable object. I then run all of that data through a custom validation (based on DB information) and then spit out the exceptions (errors) that occur into a Gridview depending on the exception. the max number is 4 Gridviews in one UpdatePanel (each Gridview has it’s own functionality). There are two Gridviews that I am using a button to do an action using the data contained in the Gridview. Those two buttons are also located in the Update Panel, just underneath the corresponding Gridviews. Each Gridview is wrapped in an AJAX Collapsible Panel Extender.

Now, when the user clicks on the button, I have a click event in the code behind where I take the information and depending on the exception that occurred, Update or Insert the DB. I loop through the rows, and if no error occurs, I call the datatable.ImportRow and pass the current row to my “Ready” table. I use a ScriptManager.RegisterStartupScript in order to display an alert box letting them know if any errors occurred. Then, I rebind the exception table and the “Ready” table. I have tried just adding an AsyncPostbackTrigger, I have attempted simply calling udpMain.Update() in the code behind, and tried both options of setting the UpdatePanel’s UpdateMode property to “Always” and “Conditional”.

HTML

    <asp:UpdatePanel ID="udpMain" runat="server" UpdateMode="Always">
<ContentTemplate>
    <asp:Panel ID="pnlOwnershipDetailsHead" runat="server" Visible="false">
                <div class="windHeader" style="cursor: pointer">
                    <asp:Label id="lblOwnershipDetails" runat="server">Ownership Exceptions</asp:Label>
                    <asp:ImageButton id="btnOwnershipHead" runat="server"/>
                </div>
              </asp:Panel>
               <asp:Panel ID="pnlOwnershipDetailsBody" runat="server" Visible="false" CssClass="pnl">
                <asp:GridView ID="gvOwnershipDetails" runat="server" CssClass="wind" CellPadding="5" AutoGenerateColumns="false">
                    <HeaderStyle CssClass="windHeader" />
                    <Columns>
                        <asp:BoundField DataField="Description" HeaderText="Description" />
                        <asp:BoundField DataField="Serial Number" HeaderText="Serial Number" />
                        <asp:BoundField DataField="Facility" HeaderText="Facility" />
                        <asp:BoundField DataField="Department" HeaderText="Department" />
                        <asp:BoundField DataField="EmpID" HeaderText="EmpID" />
                        <asp:BoundField DataField="Configuration" HeaderText="Config" />
                        <asp:BoundField DataField="Error" HeaderText="Errors" />
                        <asp:TemplateField>
                            <HeaderTemplate> 
                                <asp:CheckBox ID="chkHeader" ToolTip="Select All" runat="server" onclick="changeAllCheckBoxes(this)" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox ID="chkItem" runat="server" ToolTip="Select this item" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                    <asp:Button ID="btnOwnershipDetails" Text="Change Information" runat="server" CssClass="btn editBtn" />
                    <ajax:ConfirmButtonExtender ID="cbeOwnershipDetails" runat="server" TargetControlID="btnOwnershipDetails"
                        ConfirmText="Are you sure you would like to change the ownership information for the selected items?"
                        OnClientCancel="CancelClick"  />
               </asp:Panel>
</ContentTemplate>
    <asp:UpdatePanel>

CODE BEHIND

 Protected Sub btnOwnershipDetails_Click(sender As Object, e As System.EventArgs) Handles btnOwnershipDetails.Click
        Dim importdata As New ImportData
        Dim ownershipdt As Data.DataTable = Session("ownershipdt")
        Dim finalimportdt As Data.DataTable = Session("finalimportdt")
        Dim existsError As Boolean = False

        For Each Row As Data.DataRow In ownershipdt.Rows
            Dim i As Integer = 0
            Dim cb As CheckBox = CType(gvOwnershipDetails.Rows(i).Cells(7).Controls(1), CheckBox)
            If cb.Checked Then
                If importdata.CheckEmpExists(Row("EmpID").ToString) And importdata.CheckSiteExists(Row("Facility").ToString) And importdata.CheckDeptExists(Row("Department").ToString) Then
                    importdata.UpdateDBOwnership(Row("Serial Number").ToString, ClientInfo.GetEmpID(Row("EmpID").ToString), ClientInfo.GetSiteID(Row("Facility").ToString), ClientInfo.GetDeptID(Row("Department").ToString), _
                                                Row("Description").ToString, Row("Configuration").ToString, portalUser.EmployeeText)

                    finalimportdt.ImportRow(Row)
                Else
                    existsError = True
                End If
            End If
            i += 1
        Next
        If existsError = False Then 'Show alert box
            ScriptManager.RegisterStartupScript(udpMain, udpMain.GetType(), "alert", "alert('You have changed the ownership information for the selected rows.')", True)
        Else
            ScriptManager.RegisterStartupScript(udpMain, udpMain.GetType(), "alert", "alert('There was an issue changing ownership to all of the selected rows.')", True)
        End If
        bindGV(gvOwnershipDetails, ownershipdt)
        bindGV(gvImportDetails, finalimportdt)
        'udpMain.Update()
        Session("ownershipdt") = ownershipdt
        Session("finalimportdt") = finalimportdt
        btnEmail.Enabled = True
    End Sub
  • 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-06-16T06:12:00+00:00Added an answer on June 16, 2026 at 6:12 am

    Finally! I Have found the answer! https://sites.google.com/site/arlen4mysite/full-postback-for-templatef

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

Sidebar

Related Questions

I'm reading this documentation article about Custom Annotations in Doctrine . I understand that
I understand that this problem is incredibly common and I have read through quite
I am very new to Silverlight development. I understand that this is client side
This issue is very common in stackoverflow, and there's a lot of different questions
I have been reading some articles on memory leaks in Android and watched this
I understand that this question may be subjective, this is why I need an
I understand that this question could be answered with a simple sentence and that
I understand that this can be done at release using the maven-gpg-plugin. However, I
I'll start of by saying that I understand that this topic is complicated and
i understand that some files get published to this folder in my application. i

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.