Welcome Guest Search | Active Topics | Sign In | Register

Embedded Callbackpanel Options
Grenzer
Posted: Friday, August 17, 2007 2:25:28 AM
Rank: Newbie
Groups: Member

Joined: 8/17/2007
Posts: 2
Hey guys,

The following scenario is creating myself a few headaches. Before I start adding code lines here that you need to read I thought I try to explain what I am doing first. On a page I created a small box that allows you to log in. And here is the structure:

CallbackPanel1
asp:panel id=panel_forUnregisteredUsers
TabStrip ID=For_UnregisteredUsers
TabItems
Table with textbox for loggin in and a button to submit the credentials (button is trigger for CbP1)
/asp:panel

asp:panel id=panel_forRegisteredUsers
TabStrip id=TabStrip_ForRegisteredUsers MultiPageId=Multipage RaisesServerEvent=true
TabItems
CallbackPanel2 triggered by TabStrip_ForRegisteredUsers
MultiPage
PageViews
/close all open tag


My Problem is caused by CallbackPanel2. The TabStrip_ForRegisteredUsers triggers CallbackPanel2 (because I want the content beneath the tabstrip to be reloaded and not the tabstrip). When I click on a tab the callbackpanel displays the loadHTML but it doesnt change to the appropriate PageViewID. It always loads the same PageView. When I remove CallbackPanel2 and TabStrip_ForRegisteredUsers instead triggers CallbackPanel1 everything is working as expected.

My Question is: Why prevents CallbackPanel2 MultiPage loading the correct PageView. Has Multipage to trigger CallbackPanel2 instead of the TabStrip? Or do both have to trigger CallbackPanel2

Regards,
Grenzer
eo_support
Posted: Friday, August 17, 2007 7:37:47 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi Grenzer,

I do not think CallbackPanel1 and CallbackPanel2 are related in your scenario. In your situation, you can try to put your TabStrip_ForRegisteredUsers into CallbackPanel2 and it should work.

When you see "it always loads the same PageView", it actually has loaded all PageViews, but it always displays the same one. The reason is because, when a TabStrip is associated with a MultiPage, it is the TabStrip that drives the MultiPage, which means the TabStrip tells the MultiPage which PageView it should display. The TabStrip tells the MultiPage this right after the TabStrip is loaded.

When you put the MultiPage inside the CallbackPanel but the TabStrip outside, since the TabStrip is not reloaded, it didn't have the chance to tell the MultiPage about the new selected PageView. Thus you always see the same PageView.

If you really need to put the TabStrip outside of the CallbackPanel, you can do this on your server side event handler and see if that works:

MultiPage1.SelectedIndex = TabStrip_ForRegisteredUsers.SelectedIndex;

Thanks


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.