Welcome Guest Search | Active Topics | Sign In | Register

Tabstrip inside a CallbackPanel Options
Ancorensis CRL
Posted: Wednesday, March 30, 2011 6:00:07 AM
Rank: Newbie
Groups: Member

Joined: 3/24/2009
Posts: 5
Hello,

i have a problem with a CallbackPanel.

In my page i have two CallbackPanels where inside of each one has a Tabstrip that
controls a Multipage.
I also have a Timer to each CallbackPanel that changes the selectedindex of
the Tabstrip, the problem is, in the first callbackpanel, all works
perfect, but the second does do nothing.

code:
Code: HTML/ASPX
<asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:Timer ID="Timer1" runat="server" Interval="5000"></asp:Timer>
            <asp:Timer ID="Timer2" runat="server" Interval="5000">
            </asp:Timer>
        <br />
        <eo:CallbackPanel ID="CallbackPanel1" runat="server" Height="150px" 
            Triggers="{ControlID:Timer1;Parameter:},{ControlID:TabStrip1;Parameter:}" Width="200px" 
            LoadingHTML="">
                        <eo:TabStrip ID="TabStrip1" runat="server" ControlSkinID="None" 
                MultiPageID="MultiPage1" Width="300px" RaisesServerEvent="True">
                <LookItems>
                    <eo:TabItem Image-BackgroundRepeat="RepeatX" Image-Mode="TextBackground" 
                        Image-SelectedUrl="00010225" Image-Url="00010222" ItemID="_Default" 
                        LeftIcon-SelectedUrl="00010224" LeftIcon-Url="00010221" 
                        NormalStyle-CssText="color: #606060" RightIcon-SelectedUrl="00010226" 
                        RightIcon-Url="00010223" 
                        SelectedStyle-CssText="color: #2f4761; font-weight: bold;">
                        <SubGroup OverlapDepth="8" 
                            Style-CssText="font-family: tahoma; font-size: 8pt; background-image: url(00010220); background-repeat: repeat-x; cursor: hand;">
                        </SubGroup>
                    </eo:TabItem>
                </LookItems>
                <TopGroup>
                    <Items>
                        <eo:TabItem Text-Html="Teste1">
                        </eo:TabItem>
                        <eo:TabItem Text-Html="Teste2">
                        </eo:TabItem>
                        <eo:TabItem Text-Html="Teste3">
                        </eo:TabItem>
                        <eo:TabItem Text-Html="Teste4">
                        </eo:TabItem>
                        <eo:TabItem Text-Html="Teste5">
                        </eo:TabItem>
                    </Items>
                </TopGroup>
            </eo:TabStrip>
            <eo:MultiPage ID="MultiPage1" runat="server" Height="180px" Width="300px">
                <eo:PageView ID="PageView1" runat="server" Width="100%">
                    1</eo:PageView>
                <eo:PageView ID="PageView2" runat="server" Width="100%">
                    2</eo:PageView>
                <eo:PageView ID="PageView3" runat="server" Width="100%">
                    3</eo:PageView>
                <eo:PageView ID="PageView4" runat="server" Width="100%">
                    4</eo:PageView>
                <eo:PageView ID="PageView5" runat="server" Width="100%">
                    5</eo:PageView>
            </eo:MultiPage>
        </eo:CallbackPanel>
                        
            <eo:CallbackPanel ID="CallbackPanel2" runat="server" Height="150px" 
            Width="200px" Triggers="{ControlID:Timer2;Parameter:}">
                <eo:TabStrip ID="TabStrip2" runat="server" ControlSkinID="None" 
                MultiPageID="MultiPage2" Width="300px" RaisesServerEvent="True" 
                SelectedIndex="0">
                    <LookItems>
                        <eo:TabItem Image-BackgroundRepeat="RepeatX" Image-Mode="TextBackground" 
                        Image-SelectedUrl="00010225" Image-Url="00010222" ItemID="_Default" 
                        LeftIcon-SelectedUrl="00010224" LeftIcon-Url="00010221" 
                        NormalStyle-CssText="color: #606060" RightIcon-SelectedUrl="00010226" 
                        RightIcon-Url="00010223" 
                        SelectedStyle-CssText="color: #2f4761; font-weight: bold;">
                            <SubGroup OverlapDepth="8" 
                            Style-CssText="font-family: tahoma; font-size: 8pt; background-image: url(00010220); background-repeat: repeat-x; cursor: hand;">
                            </SubGroup>
                        </eo:TabItem>
                    </LookItems>
                    <TopGroup>
                        <Items>
                            <eo:TabItem Text-Html="Teste1" Selected="True">
                            </eo:TabItem>
                            <eo:TabItem Text-Html="Teste2">
                            </eo:TabItem>
                            <eo:TabItem Text-Html="Teste3">
                            </eo:TabItem>
                            <eo:TabItem Text-Html="Teste4">
                            </eo:TabItem>
                        </Items>
                    </TopGroup>
                </eo:TabStrip>
                <eo:MultiPage ID="MultiPage2" runat="server" Height="180px" Width="300px">
                    <eo:PageView ID="PageView6" runat="server" Width="100%">
                        1</eo:PageView>
                    <eo:PageView ID="PageView7" runat="server" Width="100%">
                        2</eo:PageView>
                    <eo:PageView ID="PageView8" runat="server" Width="100%">
                        3</eo:PageView>
                    <eo:PageView ID="PageView9" runat="server" Width="100%">
                        4</eo:PageView>
                </eo:MultiPage>
        </eo:CallbackPanel>



Code: Visual Basic.NET
Protected Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick
        If TabStrip1.Items.Count = TabStrip1.SelectedIndex - 1 Then
            TabStrip1.SelectedIndex = 0
        Else
            TabStrip1.SelectedIndex = TabStrip1.SelectedIndex + 1
        End If
    End Sub

    Protected Sub TabStrip1_ItemClick(ByVal sender As Object, ByVal e As EO.Web.NavigationItemEventArgs) Handles TabStrip1.ItemClick
        Timer1.Enabled = False
        Timer2.Enabled = True
    End Sub

    Protected Sub TabStrip2_ItemClick(ByVal sender As Object, ByVal e As EO.Web.NavigationItemEventArgs) Handles TabStrip2.ItemClick
        Timer1.Enabled = True
        Timer2.Enabled = False
    End Sub

    Protected Sub Timer2_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer2.Tick
        If TabStrip2.Items.Count = TabStrip2.SelectedIndex - 1 Then
            TabStrip2.SelectedIndex = 0
        Else
            TabStrip2.SelectedIndex = TabStrip2.SelectedIndex + 1
        End If
    End Sub


If i change the second Callbackpanel to an UpdatePanel, all works perfect.

Best Regards,
Sérgio Gonçalves
eo_support
Posted: Wednesday, March 30, 2011 6:42:02 PM
Rank: Administration
Groups: Administration

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

You will want to avoid firing both timers at exactly the same time and interval. When both firing at the same time, one must be queued up. However the queued up Callback will lose its context information when it finally has a chance to run. This causes the page to stop firing Timer2's Tick event.

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.