Welcome Guest Search | Active Topics | Sign In | Register

Callbackpanel , tabstrip , multipage , validationsummary Options
KoenL
Posted: Thursday, January 3, 2008 7:29:54 AM
Rank: Member
Groups: Member

Joined: 11/16/2007
Posts: 13
Hi ,

I have a callbackpanel with a tabstrip with two tabs which are two pageviews.
I have one validationsummary that is in the callbackpanel but not in the multipage .
On the two pageview are fields that have to be filled in correct (RequiredFieldValidator).
The errormessages are collected in the validationsummary .

The problem is that the validationsummary does not show when you are on the second tab and click the savebutton.




<eo:CallbackPanel ID="pnl1" runat="server" Triggers="{ControlID:TabStrip;Parameter:},{ControlID:lstEmployer;Parameter:},{ControlID:lstProfile;Parameter:},{ControlID:MultiPage;Parameter:},{ControlID:saveButton;Parameter:}"
Width="600">
<table width=100%>
<tr>
<td>
<h1><asp:Literal Runat="server" ID="titleLiteral"/></h1>
</td>
</tr>
<tr>
<td>
<A href="OvUser.aspx"><img runat=server id=imgBackButton src="../../images/Global/back.gif" border=0 /></A>
</td>
</tr>
<tr>
<td colspan=3 class=error>
<asp:label id=messageLabel Runat="server" CssClass="error"></asp:label><br /><asp:ValidationSummary Runat="server" ID="validationSummary" DisplayMode="List"/>
<asp:Literal ID=hiddenProfileIdLiteral runat=server Visible=false></asp:Literal>
<asp:Literal ID=hiddenProfileNameLiteral runat=server Visible=false></asp:Literal>
</td>
</tr>
</table>
<table>
<tr>
<td align=left style="width: 600px">
<eo:TabStrip ID="TabStrip" runat="server" ControlSkinID="None" MultiPageID="MultiPage" RaisesServerEvent="True" >
<TopGroup>
<Items>
<eo:TabItem Text-Html="_Personalia1" Value=1 >
</eo:TabItem>
<eo:TabItem Text-Html="_Personalia2" Value=2 >
</eo:TabItem>
</Items>
</TopGroup>
<LookItems>
<eo:TabItem Height="21" HoverStyle-CssText="position: relative; top: 2px; background-image: url(00010002); background-repeat: repeat-x"
ItemID="_Default" LeftIcon-HoverUrl="00010006" LeftIcon-SelectedUrl="00010008"
LeftIcon-Url="00010004" NormalStyle-CssText="position: relative; top: 2px; background-image: url(00010001); background-repeat: repeat-x"
RightIcon-HoverUrl="00010007" RightIcon-SelectedUrl="00010009" RightIcon-Url="00010005"
SelectedStyle-CssText="background-image: url(00010003); background-repeat: repeat-x"
Text-Padding-Bottom="2" Text-Padding-Top="1">
<SubGroup ItemSpacing="1" Style-CssText="background-image:url(00010000);background-position-y:bottom;background-repeat:repeat-x;color:black;cursor:hand;font-family:'Microsoft Sans Serif', Verdana;font-size:8.25pt;">
</SubGroup>
</eo:TabItem>
</LookItems>
</eo:TabStrip>
<br />
</td>
</tr>
<tr>
<td style="width: 600px">
<eo:MultiPage runat="server" id="MultiPage" >
<eo:PageView id="Pageview1" runat="server">
<table>
<tr>
<td><asp:Literal ID=nameLiteral runat=server >_Name</asp:Literal></td>
<td><asp:TextBox ID=txtName runat=server MaxLength=50></asp:TextBox><asp:RequiredFieldValidator Runat="server" ID="txtNameVal" ControlToValidate="txtName" ErrorMessage="_Name is verplicht." Display="None"/></td>
<td><asp:Literal ID=placeOfBirthLiteral runat=server>_PlaceOfBirth</asp:Literal></td>
<td><asp:TextBox ID=txtPlaceOfBirth runat=server></asp:TextBox><asp:RequiredFieldValidator Runat="server" ID="txtPlaceOfBirthVal" ControlToValidate="txtPlaceOfBirth" ErrorMessage="_PlaceOfBirth is verplicht." Display="None"/></td>
</tr>

</table>
</eo:PageView>
<eo:PageView id="Pageview2" runat="server">
<table>
<tr>
<td><asp:Literal ID=departmentLiteral runat=server>_Department</asp:Literal></td>
<td><asp:DropDownList ID=lstDepartment runat=server></asp:DropDownList></td>
<td><asp:Literal ID=employerLiteral runat=server>_Employer</asp:Literal></td>
<td><asp:DropDownList ID=lstEmployer runat=server OnSelectedIndexChanged="lstEmployer_SelectedIndexChanged" AutoPostBack=true></asp:DropDownList></td>
</tr>

</table>
</eo:PageView>
</eo:MultiPage>
</td>
</tr>
</table>
</eo:CallbackPanel>
</td>
</tr>
<tr>
<td align=left><asp:LinkButton CausesValidation=false id=startButton runat="server" OnClick="startButton_Click"><img runat=server id=imgStartButton border=0 /></asp:LinkButton></td>
</tr>
<tr>
<td align=left><asp:LinkButton id=saveButton runat="server" OnClick="saveButton_Click" ><img runat=server id=imgSaveButton border=0 /></asp:LinkButton></td>
</tr>


I have did some cutting in the code of not inport HTML .
eo_support
Posted: Thursday, January 3, 2008 10:48:58 AM
Rank: Administration
Groups: Administration

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

We tested your code with our latest build and it appears to be working fine. I've sent you a private message with the download link to the latest build. Please take a look and let us know how it goes!

Thanks
KoenL
Posted: Friday, January 4, 2008 12:49:08 AM
Rank: Member
Groups: Member

Joined: 11/16/2007
Posts: 13
Thanks for the replay .
But it did not solve my problem.

I'll post the whole code to let you see what i am doing .

I want to create a new user . The fields (requierd fiels) are on two pages of the multipage as you can see.
I want only one place for the validatiosummary .Outside the multipage , as you can see.
The problem is there when you switch from tab1 to tab2 (in fact from page1 to page2) .
The validationsummary does not get a update (if you click the savebutton and some fields are not filled in).
I think the callbackpanel can't to a 'postback' because some requiredfields are not filled in.
And because of this the validationsummary does never gets to by visible for my users.
If you fill in all fiels properly then you can add a new user ( this is tested ).

<eo:CallbackPanel ID="pnl1" runat="server" Triggers="{ControlID:TabStrip;Parameter:},{ControlID:lstEmployer;Parameter:},{ControlID:lstProfile;Parameter:},{ControlID:MultiPage;Parameter:},{ControlID:saveButton;Parameter:}"
Width="600">
<table width=100%>
<tr>
<td>
<h1><asp:Literal Runat="server" ID="titleLiteral"/></h1>
</td>
</tr>
<tr>
<td>
<A href="OvUser.aspx"><img runat=server id=imgBackButton src="../../images/Global/back.gif" border=0 /></A>
</td>
</tr>
<tr>
<td colspan=3 class=error>
<asp:label id=messageLabel Runat="server" CssClass="error"></asp:label><br /><asp:ValidationSummary Runat="server" ID="validationSummary" DisplayMode="List"/>
<asp:Literal ID=hiddenProfileIdLiteral runat=server Visible=false></asp:Literal>
<asp:Literal ID=hiddenProfileNameLiteral runat=server Visible=false></asp:Literal>
</td>
</tr>
</table>
<table>
<tr>
<td align=left style="width: 600px">
<eo:TabStrip ID="TabStrip" runat="server" ControlSkinID="None" MultiPageID="MultiPage" RaisesServerEvent="True" >
<TopGroup>
<Items>
<eo:TabItem Text-Html="_Personalia1" Value=1 >
</eo:TabItem>
<eo:TabItem Text-Html="_Personalia2" Value=2 >
</eo:TabItem>
</Items>
</TopGroup>
<LookItems>
<eo:TabItem Height="21" HoverStyle-CssText="position: relative; top: 2px; background-image: url(00010002); background-repeat: repeat-x"
ItemID="_Default" LeftIcon-HoverUrl="00010006" LeftIcon-SelectedUrl="00010008"
LeftIcon-Url="00010004" NormalStyle-CssText="position: relative; top: 2px; background-image: url(00010001); background-repeat: repeat-x"
RightIcon-HoverUrl="00010007" RightIcon-SelectedUrl="00010009" RightIcon-Url="00010005"
SelectedStyle-CssText="background-image: url(00010003); background-repeat: repeat-x"
Text-Padding-Bottom="2" Text-Padding-Top="1">
<SubGroup ItemSpacing="1" Style-CssText="background-image:url(00010000);background-position-y:bottom;background-repeat:repeat-x;color:black;cursor:hand;font-family:'Microsoft Sans Serif', Verdana;font-size:8.25pt;">
</SubGroup>
</eo:TabItem>
</LookItems>
</eo:TabStrip>
<br />
</td>
</tr>
<tr>
<td style="width: 600px">
<eo:MultiPage runat="server" id="MultiPage" >
<eo:PageView id="Pageview1" runat="server">
<table>
<tr>
<td><asp:Literal ID=nameLiteral runat=server >_Name</asp:Literal></td>
<td><asp:TextBox ID=txtName runat=server MaxLength=50></asp:TextBox><asp:RequiredFieldValidator Runat="server" ID="txtNameVal" ControlToValidate="txtName" ErrorMessage="_Name is verplicht." Display="None"/></td>
<td><asp:Literal ID=placeOfBirthLiteral runat=server>_PlaceOfBirth</asp:Literal></td>
<td><asp:TextBox ID=txtPlaceOfBirth runat=server></asp:TextBox><asp:RequiredFieldValidator Runat="server" ID="txtPlaceOfBirthVal" ControlToValidate="txtPlaceOfBirth" ErrorMessage="_PlaceOfBirth is verplicht." Display="None"/></td>
</tr>
<tr>
<td><asp:Literal ID=firstNameLiteral runat=server >_FirstName</asp:Literal></td>
<td><asp:TextBox ID=txtFirstName runat=server MaxLength=50></asp:TextBox><asp:RequiredFieldValidator Runat="server" ID="txtFirstNameVal" ControlToValidate="txtFirstName" ErrorMessage="_FirstName is verplicht." Display="None"/></td>
<td><asp:Literal ID=birthDateLiteral runat=server>_BirthDate</asp:Literal></td>
<td><Calendar:DatePicker ID=txtBirthDate runat=server DatePickerPagePath="../../Controls/DatePicker/DatePicker.aspx"/></td>
</tr>
<tr>
<td><asp:Literal ID=addressTitleLiteral runat=server >_AddressTitle</asp:Literal></td>
<td><asp:DropDownList ID=lstAddressTitle runat=server></asp:DropDownList></td>
<td><asp:Literal ID=nationalityLiteral runat=server >_Nationality</asp:Literal></td>
<td><asp:TextBox ID=txtNationality runat=server Width=20 MaxLength=2></asp:TextBox><asp:RequiredFieldValidator Runat="server" ID="txtNationalityVal" ControlToValidate="txtNationality" ErrorMessage="_Nationality is verplicht." Display="None"/></td>
</tr>
<tr>
<td><asp:Literal ID=addressLiteral runat=server >_Address</asp:Literal></td>
<td><asp:TextBox ID=txtAddress runat=server MaxLength=50></asp:TextBox><asp:RequiredFieldValidator Runat="server" ID="txtAddressValidator" ControlToValidate="txtAddress" ErrorMessage="_Address is verplicht." Display="None"/></td>
<td><asp:Literal ID=dateInLiteral runat=server >_DateIn</asp:Literal></td>
<td><Calendar:DatePicker ID=txtDateIn runat=server DatePickerPagePath="../../Controls/DatePicker/DatePicker.aspx"/></td>
</tr>
<tr>
<td><asp:Literal ID=postalCodeLiteral runat=server >_PostalCode</asp:Literal></td>
<td><asp:TextBox ID=txtPostalCode runat=server MaxLength=4></asp:TextBox><asp:RequiredFieldValidator Runat="server" ID="txtPostalCodeVal" ControlToValidate="txtPostalCode" ErrorMessage="_PostalCode is verplicht." Display="None"/></td>
<td><asp:Literal ID=dateOutLiteral runat=server >_DateOut</asp:Literal></td>
<td><Calendar:DatePicker ID=txtDateOut runat=server DatePickerPagePath="../../Controls/DatePicker/DatePicker.aspx"/></td>
</tr>
<tr>
<td><asp:Literal ID=cityLiteral runat=server >_City</asp:Literal></td>
<td><asp:TextBox ID=txtCity runat=server MaxLength=50></asp:TextBox><asp:RequiredFieldValidator Runat="server" ID="txtCityVal" ControlToValidate="txtCity" ErrorMessage="_City is verplicht." Display="None"/></td>
<td><asp:Literal ID=sexLiteral runat=server >_Sex</asp:Literal></td>
<td><asp:DropDownList ID=lstSex runat=server>
<asp:ListItem Selected=true Text="_Male" Value="M"></asp:ListItem>
<asp:ListItem Text="_Female" Value="F"></asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td><asp:Literal ID=cardNbrLiteral runat=server>_CardNumber</asp:Literal></td>
<td><asp:TextBox ID=txtCardNbr runat=server MaxLength=50 ></asp:TextBox><asp:RequiredFieldValidator Runat="server" ID="txtCardNbrVal" ControlToValidate="txtCardNbr" ErrorMessage="_CardNbr is verplicht." Display="None"/></td>
<td><asp:Literal ID=chipNumberLiteral runat=server>_ChipNumber</asp:Literal></td>
<td><asp:TextBox ID=txtChipNumber runat=server Width=250 MaxLength=50></asp:TextBox><%--<asp:RequiredFieldValidator Runat="server" ID="txtChipNumberLiteralVal" ControlToValidate="txtChipNumber" ErrorMessage="_ChipNumber is verplicht." Display="None"/>--%></td>
</tr>
<tr>
<td><asp:Literal ID=countryLiteral runat=server >_Country</asp:Literal></td>
<td><asp:TextBox ID=txtCountry runat=server MaxLength=10></asp:TextBox><asp:RequiredFieldValidator Runat="server" ID="txtCountryVal" ControlToValidate="txtCountry" ErrorMessage="_Country is verplicht." Display="None"/></td>
<td><asp:Literal ID=nationalRegNbrLiteral runat=server>_NationalRegNbr</asp:Literal></td>
<td><asp:TextBox ID=txtNationalRegNbr runat=server MaxLength=11></asp:TextBox><asp:RequiredFieldValidator Runat="server" ID="txtNationalRegNbrVal" ControlToValidate="txtNationalRegNbr" ErrorMessage="_NationalRegNbr is verplicht." Display="None"/><asp:RegularExpressionValidator ID=txtNationalNbRegExp runat=server ControlToValidate=txtNationalRegNbr ErrorMessage="_National number is niet correct" ValidationExpression="[0-9]{11}" Display=none></asp:RegularExpressionValidator></td>
</tr>
<tr> <td ><asp:Image ID=eidImage runat=server Visible=false /></td></tr>
</table>
</eo:PageView>
<eo:PageView id="Pageview2" runat="server">
<table>
<tr>
<td><asp:Literal ID=departmentLiteral runat=server>_Department</asp:Literal></td>
<td><asp:DropDownList ID=lstDepartment runat=server></asp:DropDownList></td>
<td><asp:Literal ID=employerLiteral runat=server>_Employer</asp:Literal></td>
<td><asp:DropDownList ID=lstEmployer runat=server OnSelectedIndexChanged="lstEmployer_SelectedIndexChanged" AutoPostBack=true></asp:DropDownList></td>
</tr>
<tr>
<td><asp:Literal ID=branchLiteral runat=server>_Branch</asp:Literal></td>
<td><asp:DropDownList ID=lstBranch runat=server></asp:DropDownList></td>
<td><asp:Literal ID=functionCatLiteral runat=server>_FunctionCategory</asp:Literal></td>
<td><asp:DropDownList ID=lstFunctionCat runat=server OnSelectedIndexChanged="lstFunctionCat_SelectedIndexChanged" AutoPostBack=true></asp:DropDownList></td>
</tr>
<tr>
<td><asp:Literal ID=registerNbrLiteral runat=server>_RegisterNumber</asp:Literal></td>
<td><asp:TextBox ID=txtRegisterNumber runat=server MaxLength=50></asp:TextBox><%--<asp:RequiredFieldValidator Runat="server" ID="txtRegisterNumberVal" ControlToValidate="txtRegisterNumber" ErrorMessage="_RegisterNumber is verplicht." Display="None"/>--%></td>
<td><asp:Literal ID=civilState runat=server>_CivilState</asp:Literal></td>
<td><asp:DropDownList ID=lstCivilSate runat=server></asp:DropDownList></td>
</tr>
<tr>
<td>
<asp:RadioButton ID=rdnDutch GroupName=languageRdb runat=server />
<asp:Literal ID=dutchLiteral runat=server >_Dutch</asp:Literal>
</td>
<td>
<asp:RadioButton ID=rdbFrench GroupName=languageRdb runat=server />
<asp:Literal ID=frenchLiteral runat=server >_French</asp:Literal>
</td>
<td><asp:Literal ID=celPhoneLiteral runat=server >_Celphone</asp:Literal></td>
<td><asp:TextBox ID=txtCelPhone runat=server MaxLength=20></asp:TextBox></td>
</tr>
<tr>
<td><asp:Literal ID=employeeNbrLiteral runat=server>_EmployeeNbr</asp:Literal></td>
<td><asp:TextBox ID=txtEmployeeNbr runat=server Enabled=false MaxLength=20></asp:TextBox></td>
<td><asp:Literal ID=emailAddressLiteral runat=server>_EmailAddress</asp:Literal></td>
<td><asp:TextBox ID=txtEmailAddress runat=server MaxLength=50></asp:TextBox> <asp:regularexpressionvalidator id="emailRegularExpr" Runat="server" Display="None" ErrorMessage="_E-mail is ongeldig."
ControlToValidate="txtEmailAddress" ValidationExpression="^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"></asp:regularexpressionvalidator></td>
</tr>
<tr>
<td><asp:Literal ID=bankAccountNbrLiteral runat=server>_BackAccountNbr</asp:Literal></td>
<td>
<asp:TextBox ID=txtBanckPrefix runat=server Width=20 MaxLength=3></asp:TextBox>&nbsp
<asp:TextBox ID=txtBankAccountNumber runat=server MaxLength=14></asp:TextBox>
</td>
<td><asp:Literal ID=profileLiteral runat=server>_Profile</asp:Literal></td>
<td><asp:DropDownList ID=lstProfile runat=server></asp:DropDownList></td>
</tr>
<tr>
<td><asp:Literal ID=bicNbrLiteral runat=server ></asp:Literal></td>
<td><asp:TextBox ID=txtBicNbr runat=server MaxLength=8></asp:TextBox></td>
<td><asp:Literal ID=ibanNbrLiteral runat=server></asp:Literal></td>
<td><asp:TextBox ID=txtIbanNbr runat=server MaxLength=34></asp:TextBox></td>
</tr>
<tr>
<td><asp:Literal ID=weekCalenderLiteral runat=server ></asp:Literal></td>
<td><asp:DropDownList ID=lstWeekCalendar runat=server ></asp:DropDownList></td>
<td colspan=2><asp:Literal ID=accountStatusUnlockedLiteral runat=server>_UnLoced</asp:Literal><asp:RadioButton ID=rdbAccountUnlocked runat=server GroupName=rdbLocked Checked=true />
<asp:Literal ID=accountStatusLockedLiteral runat=server>_Locked</asp:Literal><asp:RadioButton ID=rdbAccountLocked runat=server GroupName=rdbLocked /></td>
</tr>
</table>
</eo:PageView>
</eo:MultiPage>
</td>
</tr>
</table>
</eo:CallbackPanel>
KoenL
Posted: Friday, January 4, 2008 5:51:35 AM
Rank: Member
Groups: Member

Joined: 11/16/2007
Posts: 13
Hi ,

I have fixed my problem.

I have put <asp:ValidationSummary Runat="server" ID="validationSummary" DisplayMode="List"/> outside my callbackpanel .
And i have put my <asp:label id=messageLabel Runat="server" CssClass="error"></asp:label><br /> inside my callbackpanel (here i show errormessages from serverside).

Contact me if you need more info.

Greetings
eo_support
Posted: Friday, January 4, 2008 6:12:54 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Cool. Thanks for the update.


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.