Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 5th, 2004, 09:44 AM
Registered User
Join Date: May 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datagrid control - Dynamic columns

We have a datagrid control on a web form with 2 fixed cols. and we dynamically add a different amount of columns each time we load the page. While still in the procedure that creates these columns, we are able to manipulate the columns and add controls to the specific column we choose. (at this point grid.column.count is correct and reflects all columns, including the dynamic ones)
However, once the page is fully loaded and displayed (the grid looks great), the user is able to edit the controls in the one specific column, but upon hitting save, only the two fixed columns are recognized by the code, and the grid.column.count property is equal to 2.

How do we reference dynamic columns on a datagrid from a cmdbutton (or anywhere else) after the page has been shown?
Reply With Quote
  #2 (permalink)  
Old June 25th, 2004, 06:58 PM
Registered User
Join Date: Jun 2004
Location: Juneau, AK, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to brandonwood Send a message via MSN to brandonwood Send a message via Yahoo to brandonwood

I have been having this same problem, does anyone know how to do this?
Reply With Quote
  #3 (permalink)  
Old September 21st, 2004, 12:05 PM
Registered User
Join Date: Sep 2004
Location: Boone, NC, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

You have to recreate the columns on postback so that the codebehind is aware that they exist.

Only design time columns are accessible each round trip.



Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic Columns tray99 XSLT 2 July 29th, 2008 01:25 PM
Dynamic creation of Columns in datagrid p330418 ASP.NET 2.0 Basics 0 March 29th, 2008 07:33 AM
Dynamic Columns & Dynamic Grouping ??? nileshgambhava BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 1 March 24th, 2008 07:58 AM
Dynamic columns pankaj_daga Crystal Reports 1 August 30th, 2007 11:07 AM
Dynamic Columns & Dynamic Grouping ??? nileshgambhava SQL Server 2005 0 December 12th, 2006 12:45 AM

All times are GMT -4. The time now is 10:11 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.