Items Disappear after Postback

rated by 0 users
This post has 4 Replies | 1 Follower

Top 500 Contributor
Points 355
ustesgreenridge Posted: 10-15-2008 11:41 AM

I have a webpanel with a table and a listbar with items in it that I want the client to select one, when they don't I add text to a div on the submit button click.  When the page reloads none of the listbar items are there, the table is there and the buttons but they are disabled.  Help Please....

  • | Post Points: 20
Top 10 Contributor
Points 29,548
Infragistics Employee

Once you add your controls to the WebListbar dynamically, you need to add the controls back to the WebListbar again at the same point in the page lifecycle, if you want these controls to function correctly.  If you're adding the controls in response to a button click, it becomes very hard to add them again at the right time during subsequent postbacks.  This behavior is common among ASP.NET controls, and isn't unique to WebListbar.

My suggestion is to not put the control in the WebListbar dynamically in the first place.  Instead, put it in at design-time, with its Visible property set to false so that it doesn't render to your page's HTML output.  In response to your button click, set the Visible property to true.  That way, you'll know that your control exists when you need it.

Vince McDonald
Manager of Developer Support, MCP
Infragistics, Inc.

Need help? Find the various ways you can ask for help from Infragistics.

  • | Post Points: 20
Top 500 Contributor
Points 355

they are added at design time.  Nothing is dynamic.  Also, all al my standard asp.net control are fine, only the infragistics controls apear to disabled.  Webcombo won't drop down, webimagebutton disabled, etc.  Attached is my html.

 

  • | Post Points: 5
Top 500 Contributor
Points 355

here is the stripped down code behind.  It seems after the event the listbar is in the back.

  • | Post Points: 5
Top 500 Contributor
Points 355

ok, created a test app and copied the code to it and it works as expected.   have attached 2 images maybe someone can gather what is going on from the images.


  • | Post Points: 5
Page 1 of 1 (5 items) | RSS

Forum Statistics

19,640 users have contributed to 78,505 threads and 87,114 posts.

In the past week, we've had 1,434 new users, adding to our total of 423,240 registered users!

In the past 24 hours, we have 22 new thread(s), 65 new post(s), and

In the past 3 days, the most popular thread for everyone has been "UltraGrid - ConditionAppearanceRow". The post with the most views is "Re: A gripe about support and sample projects". The most replies were made to "A gripe about support and sample projects".

Please welcome our newest member paig.