i keep getting this error
Microsoft JScript runtime error: 'get_postBackElement().id' is null or not an object
when I click on the second or third tab
when I try to implement the load on demand radtabstrip demo
i am using 2010.1 519 version of the controls
the demo seems to say this should work - is this a bug?
aspx page
code behind
Microsoft JScript runtime error: 'get_postBackElement().id' is null or not an object
when I click on the second or third tab
when I try to implement the load on demand radtabstrip demo
i am using 2010.1 519 version of the controls
the demo seems to say this should work - is this a bug?
aspx page
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"> |
| </telerik:RadAjaxLoadingPanel> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadTabStrip1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="RadMultiPage1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="RadAjaxLoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <script type="text/javascript"> |
| function onTabSelecting(sender, args) { |
| var foo = args.get_tab(); |
| if (args.get_tab().get_pageViewID()) { |
| args.get_tab().set_postBack(false); |
| } |
| } |
| </script> |
| <telerik:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" |
| MultiPageID="RadMultiPage1" Orientation="HorizontalTop" |
| OnTabClick="RadTabStrip1_TabClick" OnClientTabSelecting="onTabSelecting"> |
| </telerik:RadTabStrip> |
| <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0" |
| Height="250px" Width="475px" BorderWidth="1" OnPageViewCreated="RadMultiPage1_PageViewCreated"> |
| </telerik:RadMultiPage> |
code behind
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!Page.IsPostBack) |
| { |
| AddTab(RadTabStrip1, "Tab1"); |
| AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab1")); |
| AddTab(RadTabStrip1, "Tab2"); |
| //AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab2")); |
| AddTab(RadTabStrip1, "Tab3"); |
| //AddPageView(RadMultiPage1, RadTabStrip1.FindTabByText("Tab3")); |
| } |
| } |
| private void AddTab(RadTabStrip tabstrip, string tabName) |
| { |
| RadTab tab = new RadTab(); |
| tab.Text = tabName; |
| tabstrip.Tabs.Add(tab); |
| } |
| private void AddPageView(RadMultiPage multipage, RadTab tab) |
| { |
| RadPageView pageView = new RadPageView(); |
| pageView.ID = tab.Text; |
| multipage.PageViews.Add(pageView); |
| tab.PageViewID = pageView.ID; |
| } |
| protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e) |
| { |
| AddPageView(RadMultiPage1, e.Tab); |
| e.Tab.PageView.Selected = true; |
| } |
| protected void RadMultiPage1_PageViewCreated(object sender, RadMultiPageEventArgs e) |
| { |
| string userControlPath = "~/WebUserControl.ascx"; |
| Control userControl = Page.LoadControl(userControlPath); |
| if (e.PageView.ID == "Tab1") |
| { |
| userControl.ID = "UserControl1"; |
| } |
| else if (e.PageView.ID == "Tab2") |
| { |
| userControl.ID = "UserControl2"; |
| } |
| else if (e.PageView.ID == "Tab3") |
| { |
| userControl.ID = "UserControl3"; |
| } |
| e.PageView.Controls.Add(userControl); |
| } |