Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > ASP.NET 1.x and 2.0 Application Design
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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 January 15th, 2005, 03:38 AM
Registered User
 
Join Date: Jan 2005
Location: Hyderabad, AP, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to govind Send a message via Yahoo to govind
Default help required in datagrid dynamic template column

hi peter and all,

as i was going through all the posting regarding datagrid, u were the person to reply them....
so pls help me to solve my issue tooo.....

i am creating dymamic textbox in a datagrid, and trying to retrive the value for the same on postback, but at the time of adding the control i am gettign the Contols.Count as some value, but after postback i am not able to find any control in that cell....

Code Strip :::

/// at the time of adding the control

    TextBox txtNewCtrl = new TextBox();
    txtNewCtrl.EnableViewState = true;
    e.Item.Cells[0].Controls.Add(txtNewCtrl);


/// at the time of getting the control value

    TextBox tb = (TextBox) QGrid.Items[j].Cells[0].Controls[1];
    if(tb.Text!="")
        a_result = tb.Text;

//////

but at this time i am getting null exception since its not getting any control in that same cell

pls help me

regards
Govind
  #2 (permalink)  
Old January 2nd, 2006, 11:20 PM
Registered User
 
Join Date: Jan 2006
Location: Mumbai, MH, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Govind,

I am also looking for the solution for same problem. Where you able to find the solution? If yes kindly do forward it to me at shah_nikesh@hotmail.com

Nikesh Shah

Nikesh Shah
  #3 (permalink)  
Old January 4th, 2006, 11:32 AM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

[
i am creating dymamic textbox in a datagrid, and trying to retrive the value for the same on postback
]

What are ou asking? The value of the added control will be what you set it to.

 


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
Template Column in datagrid prankur ASP.NET 1.0 and 1.1 Professional 1 January 7th, 2006 05:20 PM
template column in datagrid p2pMember ASP.NET 1.0 and 1.1 Basics 1 November 18th, 2005 06:33 PM
Datagrid template column sonurijs ASP.NET 1.x and 2.0 Application Design 1 September 27th, 2005 12:55 PM



All times are GMT -4. The time now is 04:02 AM.


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