Welcome Guest Search | Active Topics | Sign In | Register

callbackpanel.selectindex += 1 and/or callbackpanel.selectnext() not working Options
Mike Bourne
Posted: Wednesday, June 18, 2008 7:28:10 PM
Rank: Member
Groups: Member

Joined: 7/2/2007
Posts: 16
Below you will find a sample asp.net web page executed under VS 2008 using VB.net code behind. The sample application contains a single Tabstrip containing 3 static tabs and a single callbackpanel control.

The callbackpanel contains a single multpage control. The Multipage control contains 3 pageview controls.

Inside the pageview controls are a single label and one or more buttons. The buttons (NEXT/EXIT) are used to move the user either to the next pageview or to exit the program.

I am having a problem with the callbackpanel.selectindex += 1 statement in that it does not advance the user to the next tabstrip tab nor does using "Callbackpanel.selectnext()" command.

Can someone tell me what I am doing wrong. the version of EO I am using is 2007.2.

Thanks in advance.

Mike


ASP.NET Code

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TestingOfCallBackPanel.aspx.vb" Inherits="TestingOfCallBackPanel" %>
<%@ Register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.style1
{
font-family: Verdana;
font-size: small;
font-weight: bold;
}
.style2
{
font-family: Verdana;
font-size: large;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>

<br class="style2" />
<span class="style2">Test App</span><br />
<eo:CallbackPanel ID="CallbackPanel1" runat="server" Height="150px"
Triggers="{ControlID:btnNext;Parameter:},{ControlID:btnNext2;Parameter:},{ControlID:btnExit;Parameter:}"
Width="100%" LoadingHTML="Loading, one moment please...">
<eo:TabStrip ID="TabStrip1" runat="server"
ControlSkinID="None" DesignOptions-BackColor="239, 235, 222"
MultiPageID="MultiPage1" TopLevelItemAlign="None">
<LookItems>
<eo:TabItem Image-BackgroundRepeat="RepeatX"
Image-Mode="TextBackground" Image-SelectedUrl="00010205" Image-Url="00010202"
ItemID="_Default" LeftIcon-SelectedUrl="00010204" LeftIcon-Url="00010201"
RightIcon-SelectedUrl="00010206" RightIcon-Url="00010203">
<SubGroup OverlapDepth="8"

Style-CssText="font-family: tahoma; font-size: 8pt; background-image: url(00010200); background-repeat: repeat-x; cursor: hand;">
</SubGroup>
</eo:TabItem>
</LookItems>
<TopGroup Orientation="Horizontal">
<Items>
<eo:TabItem Text-Html="Themes">
</eo:TabItem>
<eo:TabItem Text-Html="Desktop">
</eo:TabItem>
<eo:TabItem Text-Html="Screen Saver">
</eo:TabItem>
</Items>
</TopGroup>
</eo:TabStrip>
<eo:MultiPage ID="MultiPage1" runat="server" Height="180px" Width="100%">
<eo:PageView ID="PageView1" runat="server" Width="100%">
<span class="style1">
<asp:Label ID="lblPVone" runat="server" Text="PageView 1"></asp:Label>
</span>&nbsp;
<asp:Button ID="btnNext" runat="server" Text="Next" UseSubmitBehavior="False" />
&nbsp;
</eo:PageView>
<eo:PageView ID="PageView2" runat="server" Width="100%">
<asp:Label ID="lblPvtwo" runat="server"
style="font-family: Verdana; font-size: small; font-weight: 700"
Text="PageView 2"></asp:Label>
&nbsp;
<asp:Button ID="btnNext2" runat="server" Text="Next"
UseSubmitBehavior="False" />
<asp:Button ID="btnExit" runat="server" Text="EXIT" UseSubmitBehavior="False" />
</eo:PageView>
<eo:PageView ID="PageView3" runat="server" Width="100%">
<asp:Label ID="lblPvtwo0" runat="server"
style="font-size: small; font-weight: 700; font-family: Verdana"
Text="PageView 3"></asp:Label>
&nbsp;
<asp:Button ID="btnNext3" runat="server" Text="Next"
UseSubmitBehavior="False" />
<asp:Button ID="btnExit0" runat="server" Text="EXIT"
UseSubmitBehavior="False" />
</eo:PageView>
<br />
</eo:MultiPage>
</eo:CallbackPanel>

</div>
</form>
</body>
</html>


VB.NET Code Behind


Partial Class TestingOfCallBackPanel
Inherits System.Web.UI.Page

Protected Sub btnNext_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnNext.Click
MultiPage1.SelectedIndex += 1
End Sub

Protected Sub btnNext2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnNext2.Click
MultiPage1.SelectedIndex += 1
End Sub

Protected Sub btnNext3_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnNext3.Click
' do nothing
End Sub

Protected Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click
CallbackPanel1.Redirect("http://www.google.com")
End Sub

Protected Sub btnExit0_click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit0.Click
CallbackPanel1.Redirect("http://www.google.com")
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If IsPostBack = False Then
btnExit.Attributes.Add("onclick", "if(confirm('Are you sure you want to CANCEL this action?')){}else{return false}")
btnExit0.Attributes.Add("onclick", "if(confirm('Are you sure you want to CANCEL this action?')){}else{return false}")
End If
End Sub

End Class


eo_support
Posted: Wednesday, June 18, 2008 7:30:37 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Thanks for the sample code. We will take a look and see what we can find.
Mike Bourne
Posted: Thursday, June 19, 2008 4:06:46 PM
Rank: Member
Groups: Member

Joined: 7/2/2007
Posts: 16
Any luck on finding out what might be causing this issue?

Thanks,

Mike
eo_support
Posted: Thursday, June 19, 2008 6:10:53 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Hi Mike,

We have looked into the issue and noticed that when a TabStrip and a MultiPage is associated together (through the TabStrip's MultiPageID property), the TabStrip would drive the MultiPage. That means setting TabStrip's SelectedIndex, instead of the MultiPage's SelectedIndex should do the job. It was designed that way because user usually clicks on the TabStrip directly to switch the TabStrip and the MultiPage.

So the solution would be changing:

MultiPage1.SelectedIndex += 1

To:

TabStrip1.SelectedIndex += 1


That should solve the problem.

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.