I am binding telerik:RadTabStrip in code behind through database.
<telerik:RadDockLayout id="RadDockingManager1" runat="server"></telerik:RadDockLayout>
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" AutoPostBack="true" ontabclick="RadTabStrip1_TabClick"
MultiPageID="RadMultiPage1" OnClientTabSelecting="OnClientTabSelecting" CausesValidation="false">
</telerik:RadTabStrip>
function OnClientTabSelecting(sender, args)
{
var tabtext = args.get_tab().get_text();
if(tabtext == "Home")
{
/**some code here**/
_btn.click();
return false;
}
else if(tabtext == "Contact")
{
var ch = ShowContactDialog();
return ch;
}
else if(tabtext == "Career")
{
var ch = ShowCareerDialog();
return ch;
}
}
function ShowContactDialog()
{
var discountW = window.radopen("Tab_Pop_Ups/Contact_Dialog.aspx","ModalityDialog");
discountW.SetSize (220,290);
return false;
}
function ShowCareerDialog()
{
var discountW = window.radopen("Tab_Pop_Ups/Career_Dialog.aspx","LocationDialog");
discountW.SetSize (220,290);
return false;
}
public void BindTabStrip(int TabCount, DataSet ds)
{
try
{
for (int i = 0; i < TabCount; i++)
{
RadTab NewTab = new RadTab();
NewTab.Text = ds.Tables[0].Rows[i]["TabName"].ToString();
RadTabStrip1.Tabs.Add(NewTab);
RadPageView pv = new RadPageView();
pv.ID = i.ToString() + "_PageView";
RadMultiPage1.PageViews.Add(pv);
}
}
catch (Exception ex)
{
Response.Write("Account_Dashboard.aspx_:BindTabStrip" + ex.Message.ToString());
}
}
and on tab change i want to open a popup window, in which i have ok and cancel button .
If i will click on ok it will change to clicked tab otherwise it will remain in the same tab.For this i am calling the javascript function
OnClientTabSelecting.
As soon i click on another tab it will open the popup window and also changed the tab.
I want that it should not change the tab untill i click on OK of popup window and if i click on cancel it should remain in the same tab.
EX if i have three tab Home, Contact and Career and current activated tab is say Home.If i click on Contact it should open the popup window
with list of contacts and OK & cancel button and the activated tab is Home until i click on Ok.
But in my case it change the tab as popup opened.
Please help.