Skip Navigation Links
Home
Forum Home
Latest 50
Unanswered
Win Prizes
All Time Leaders
Jump to CategoryExpand Jump to Category
Login 
    Welcome Guest!
 Search Forum For :  
X
 Login
Please login to submit a new post, reply and edit exiting posts, see user profiles, and access more features. If you are not a registered member, Register here.
User Id / Email:
Password:  
Forgot Password | Forgot UserName
   Home » ASP.NET & Web Development » dynamic controls in gridview disappearng
       
Author Reply
vishal sahani
posted 25 posts
since May 02, 2011 
from

dynamic controls in gridview disappearng

  Posted on: 07 Sep 2011       
Hi guys
i am in a fix here please help.
I have a gridview which contains a dropdown list now on the selected index changed event of the drop down depending on the selected value of the drop down there are dynamically created link buttons added to the next column of the gridview in the same row as the drop down.i am able to add the link buttons but the link buttons disappear if i select from other drop down.i am also calling the function in the page load so that the buttons do not disappear.i have maintained a session to keep the track of the row index so on the bottons in the row index of session are re created & the prev buttons dis appear
How do i stop the link buttons from disappearing.
Prabhu Raja
posted  756 posts
since  Aug 10, 2011 
from  Coimbatore, TamilNadu, India

 Re: dynamic controls in gridview disappearng
  Posted on: 07 Sep 2011        0  
Try to Use Visible Property for Link Buttons in your Code.
By
Prabhu Raja
rprabhuit@live.com
iamprabhuraja.wordpress.com
vishal sahani
posted  25 posts
since  May 02, 2011 
from 

 Re: dynamic controls in gridview disappearng
  Posted on: 07 Sep 2011        0  
The link buttons are dynamically created so on postback they get destroyed.it is not the question of visibility
Vikram
posted  109 posts
since  Oct 09, 2009 
from  Mumbai

 Re: dynamic controls in gridview disappearng
  Posted on: 08 Sep 2011        0  
Hi Vishal,

   Whenever you create Link Buttons add it into the ArrayList and save arraylist into Session. While on postback, in RowDataBound event of grid View retrieve Link Buttons from Session and add it to Grid View. This will not be good practice, if you found any alternative please share the same.

Regards,

 VIkram 
vishal sahani
posted  25 posts
since  May 02, 2011 
from 

 Re: dynamic controls in gridview disappearng
  Posted on: 17 Sep 2011        0  
hi i got an alternative for it.it may not be that efficient but it did the job for me.I took a gridview inside a gridview & a linkbutton in the template field of the 2nd grid.& now i generate the number of columns depending on the dropdown i have so i dont have to worry abt the dynamic controls..
       
Top Articles
View all »
6 Months Free & No Setup Fees ASP.NET Hosting!
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites – Click Here!

 Hosted by MaximumASP  |  Found a broken link?  |  Contact Us  |  Terms & conditions  |  Privacy Policy  |  Site Map  |  Advertise with us
Current Version: 5.2011.3.12
 © 1999 - 2012  Mindcracker LLC. All Rights Reserved