I have RadTabStrip on my page. The problem I try to solve is not allow to pass to other tab if validation is failed.
For that I have next controls:
1. Validation controls connected to the specific control such as:
It is just example. As you see this control validation control is part of the some group
<asp:TextBox ID="txtEmployeeNo" CssClass="readOnlyTextbox" runat="server" Enabled="false" /> <asp:ImageButton ID="imbChangeEmployeeNo" runat="server" ImageUrl="./../Images/Search.gif" CommandName="ChangeEmployee" ToolTip="Change Employee" /> <asp:RequiredFieldValidator ID="reqlblEmployeeNoEdit" runat="server" ErrorMessage="Employee No is required." Display="None" ControlToValidate="txtEmployeeNo" ValidationGroup="valGrpGeneral" Enabled="false"></asp:RequiredFieldValidator> <asp:ValidationSummary ID="valSumGeneral" runat="server" DisplayMode="BulletList" HeaderText="The following inputs are invalid:" ValidationGroup="valGrpGeneral" ShowMessageBox="true" ShowSummary="false" /> function OnClientTabSelecting(sender, eventArgs) { var newTab = eventArgs.get_tab(); if (newTab != null) { var oldTab = newTab.get_parent().get_selectedTab(); if (oldTab != null) { switch (oldTab.get_value()) { case "<%= GeneralTabValue %>": eventArgs.set_cancel(!Page_ClientValidate("<%=GeneralTabSummaryValidationName %>")); break; } } } Validation is working OK, but.... There is some other logic related to postbacks stopped to work, immediately after I am using OnClientTabSelecting. For instant, I have button which execute ModalWindow using JavaScript. This modal window is returning some values:
function ShowModalWindow(ctrl1ID, ctrl2ID, ctrl3ID, url) { var ret = window.showModalDialog(url, this, 'dialogWidth=975px;dialogHeight=670px;resizable=yes;help=no;'); var ctrl1 = document.getElementById(ctrl1ID); // 'R' = HR Reason Code, 'E' = Employee ID, 'P' = Position var ctrl2 = document.getElementById(ctrl2ID); // The returned value var ctrl3 = document.getElementById(ctrl3ID); // Whether or not to open the control in edit mode. if (ret != null && ctrl1 != null && ctrl2 != null && ctrl3 != null) { if (ret.length > 1) { ctrl1.value = ret[0]; ctrl2.value = ret[1]; ctrl3.value = ret[2]; } } } BUT, after OnClientTabSelecting, although javascript is executed, postback doesn't.
Does anyone know what it might be the reason?