Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 February 5th, 2007, 08:16 AM
Authorized User
 
Join Date: Aug 2006
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default getting values from template columns itemtemplate

hi friends


on server buttons click event

i have added some template columns dyanmically

in template column i have itemtemplate

in itemtemplate i have textbox

it gives me proper interface as i want

but when i enter some data into
itemtemplates textbox

i don't any textboxes get textboxes

how can i solve this problem


thanks

 
Old February 5th, 2007, 12:53 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

I think you want something like this:



 
Old February 5th, 2007, 12:57 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

So, you want to retrieve the values from your dynamically created textboxes. You'll want to do something like this:

For Each i As DataGridItem In grdInspections.Items
    Dim litInspID As Literal = i.FindControl("litInspID")
    Dim chkInspBill As CheckBox = i.FindControl("chkInspBill")
    Dim Inspection As New Inspection(_oConn, litInspID.Text)
    Inspection.InspBill = chkInspBill.Checked
    Inspection.Save()
Next

Hope that gets you started in the right direction.

Richard

 
Old February 5th, 2007, 11:59 PM
Authorized User
 
Join Date: Aug 2006
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi

thanks for replying


yes i want to get the value from dynamically created columns

i have created the textboxes in item template not in edititemtemplate

i tried ur code but not working

thanks

 
Old February 6th, 2007, 04:19 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

What's not working? How can you tell? Are there any errors? Post the not working code that you wrote and I'll take a look.

Richard






Similar Threads
Thread Thread Starter Forum Replies Last Post
Filtering Template columns in Detailsview shashipandey ASP.NET 2.0 Professional 0 September 20th, 2007 04:58 AM
Need to get value of gridview template columns for kmh030 ASP.NET 2.0 Professional 1 January 6th, 2007 11:10 PM
Template Columns in a Datagrid Greg Griffiths ASP.NET 1.0 and 1.1 Basics 1 October 28th, 2004 08:02 AM
Template Columns in DataGrids jbenson001 ASP.NET 1.x and 2.0 Application Design 19 September 19th, 2004 08:48 AM
Template Columns in DataGrids jbenson001 ASP.NET 1.x and 2.0 Application Design 3 March 12th, 2004 11:01 AM





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