Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > ASP.NET 1.x and 2.0 Application Design
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 15th, 2005, 03:38 AM
Registered User
 
Join Date: Jan 2005
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
 
Old January 2nd, 2006, 11:20 PM
Registered User
 
Join Date: Jan 2006
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 [email protected]

Nikesh Shah

Nikesh Shah
 
Old January 4th, 2006, 11:32 AM
Friend of Wrox
 
Join Date: Nov 2003
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.






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





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