C# GridView dynamically built columns with textboxes ontextchanged

Posted by tnriverfish on Stack Overflow See other posts from Stack Overflow or by tnriverfish
Published on 2010-03-05T20:28:38Z Indexed on 2010/03/17 22:31 UTC
Read the original article Hit count: 526

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about c#

Related posts about gridview