Welcome Guest Search | Active Topics | Sign In | Register

Sub Callback Panel not displaying. Options
Adeel Aslam
Posted: Tuesday, September 11, 2007 8:33:44 PM
Rank: Newbie
Groups: Member

Joined: 8/21/2007
Posts: 8
Here is my scenario:

I have a parent callback panel and inside it there are two child callback panels. Parent callback panel also has a message bar that displays messages for any event happen in any of the three callback panels. I put them in a group so, I can easily update the message bar from any of the callback panels. but here problem comes.

when parent callback have any post back trigger, after callback_execute, child callback panels disappear. I am not sure, what I am doing wrong. Help me out please.

Thanks.
eo_support
Posted: Wednesday, September 12, 2007 6:27:10 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Adeel,

Usually this has to do with dynamically creating of controls. If in one of your event handler, you changed TextBox1.Text, the new text will be persisted in the view state; However if you did Panel1.Controls.Add(new Label()), the newly created Label control will NOT be persisted. CallbackPanel falls into this situation very often because CallbackPanel are often used together with dynamic control creation. As a reference, you can take a look of this topic, which discusses view states but also mentioned the importance of this factor:

http://www.essentialobjects.com/Forum/Default.aspx?g=posts&t=347

Our samples uses child callback panels this way. You can see we have some code in Page_Init to ensure we always load the "last loaded" sample. It's for exactly the same reason.

Thanks
Adeel Aslam
Posted: Wednesday, September 12, 2007 6:55:36 AM
Rank: Newbie
Groups: Member

Joined: 8/21/2007
Posts: 8
Thanks for you reply,

I have read the post you provided, but my scenario is little different. I am not creating any control dynamically. The problem is: if I do not set the group name for callback panels, each panel works independently and it works fine, it displays all the panels and their controls. The only problem was, I was not able to update my messagebar as it is in the parent panel and post back happend because of the child panel. But if I put them in a group, after parent's panel post back my child panels disapper.
eo_support
Posted: Wednesday, September 12, 2007 8:02:45 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Ah....interesting scenario, but I do not think you can group a parent CallbackPanel and a child CallbackPanel together. Is it possible for you to use a separate CallbackPanel just for the message bar?


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.