Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Pro Visual Basic 2005
|
Pro Visual Basic 2005 For advanced Visual Basic coders working in version 2005. Beginning-level questions will be redirected to other forums, including Beginning VB 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro Visual Basic 2005 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 May 3rd, 2006, 01:08 PM
Registered User
 
Join Date: Jan 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem w/ dynamically added controls in GridView

Hi-

I have a GridView control that has a dynamically added control in one column. What sort of control gets added is based on what the content is - could be a textbox, RTF Editor (instead of a normal textarea, similar to what I'm writing this post in), datepicker, etc. I'm getting the data into the control just fine when I go into edit mode for a row, but can't seem to get the contents of that control when I try to save changes and update that row.

I've tried using the RowUpdating event for the GridView control as well as the Updating event for the SQLDatasource control that the GridView is bound to. (And a whole lot of other ideas, but I'm running out)

Anyone had experience with this? ASP.NET 2, VB.NET, Visual Studio 2005 Pro and SQL Server 2005 Standard...

Thanks,

Jason

 
Old May 8th, 2006, 04:23 PM
Registered User
 
Join Date: May 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Jason,

     I was wondering if you ever got a solution to your problem. I am going through the exact same thing.

     Regards,

         Giovanni

 
Old May 12th, 2006, 09:10 AM
Registered User
 
Join Date: Jan 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Giovanni,

Unfortunately not really. I think it has to do with at what point things are created in the lifecycle of the page, but I couldn't find any other way to figure out what controls I needed any earlier. So instead I've scrapped using the GridView and created a dynamic table instead, dynamically creating all the controls and then calling the SQL SP to do the update. That's been working fine.

Jason






Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically Added Control ID changes pauliehaha ASP.NET 2.0 Basics 14 April 4th, 2007 08:56 AM
Dynamically added panel with radio buttons ADM10 Visual Basic 2005 Basics 1 May 11th, 2006 10:27 PM
Capturing Dynamically Added Client Values Colonel Angus ASP.NET 1.0 and 1.1 Professional 4 April 14th, 2006 12:38 PM
Problem in adding controls dynamically vivekshah C# 0 April 13th, 2006 08:35 AM
Raise Event for Dynamically Added DropDownList DolphinBay ASP.NET 1.0 and 1.1 Professional 3 December 6th, 2005 02:22 PM





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