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

  • Home
  • SEARCH
  • 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 649405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:56:26+00:00 2026-05-13T21:56:26+00:00

My page is a bulk order form that has many products and various size

  • 0

My page is a bulk order form that has many products and various size options.

I’ve got a gridview that has a 3 static columns with labels.
There are then some dynamically built columns.

Each of the dynamically built columns have a textbox in them.
The textbox is for quantity.

Trying to either update the server with the quantity entered each time a textbox is changed (possibly ontextchanged event) or loop though each of the rows column by column and gather all the items that have a quantity and process those items and their quantities all at once (via button onclick).

If I put the process that builds the GridView behind a if(!Page.IsPostBack) then the when a textchanged event fires the gridview only gets the static fields and the dynamic ones are gone.

If I remove the if(!Page.IsPostBack) the process to gather and build the page is too heavy on processing and takes too long to render the page again.

Some advice would be appreciated.

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-13T21:56:26+00:00Added an answer on May 13, 2026 at 9:56 pm

    I ended up building the columns dynamically in part by modifying and using the GridViewTemplate.cs I found here.

    Since my textboxes were named based on their column name (which was based on the size options) I was able to loop through the size options and use FindControl to get the text box and its value.

    protected void cmdSave_OnClick(object sender, EventArgs e)
    {
        ArrayList itemsOrdered = new ArrayList();
        foreach (GridViewRow gvr in gvMainOrderForm.Rows)
        {
            Label lblItemId = (Label)(gvr.FindControl("lblItemId"));
            string itemId = lblItemId.Text;
            foreach (string availableOption in availableOptions)
            {
                TextBox tb = (TextBox)(gvr.FindControl("tb" + availableOption));
                if (tb != null && tb.Text != "")
                {
                    ArrayList itemOrdered = new ArrayList();
                    itemOrdered.Add(itemId);
                    itemOrdered.Add(availableOption);
                    itemOrdered.Add(tb.Text);
                    itemsOrdered.Add(itemOrdered);
                }
            }
        }
    }
    

    If the value was not empty then I built a small array that had the product ID, size option and quantity.

    Now I’ll be able to use the itemsOrdered to modify my shopping cart.

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

Sidebar

Related Questions

I got a bulk of text in a file that has to be displayed
Page has menu items that would replace a 'div id=foo_(current menu item)' with 'div
I'm trying to create a bulk edit page for an app that I'm working
The following page is mucked up in IE8 -- the bulk of the content
Page A has a meta refresh to redirect to another page, C , after
Drupal's user administration page @ admin/user/user allows admins to checkmark users & perform bulk
Am working on an application which has a requirement to download bulk data from
I wrote an ASP.NET page that imported data from an Excel spreadsheet without any
I have built a bulk email sending website for a client that is required
I have been referring to the following page: http://msdn.microsoft.com/en-us/library/ms178129.aspx I simply want to bulk

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.