I have a RadTabStrip and a RadMultiPage in my MainPage.aspx.
And i am loading the PageView from code behind .
PageView1.ContentUrl = url;
<
telerik:RadTabStrip
ID
=
"RadTabStrip1"
SelectedIndex
=
"0"
runat
=
"server"
MultiPageID="RadMultiPage1" Orientation="VerticalLeft" ontabclick="RadTabStrip1_TabClick">
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"RadMultiPage1"
runat
=
"server"
SelectedIndex
=
"0"
Height
=
"800"
Width
=
"800"
>
<
telerik:RadPageView
ID
=
"PageView1"
runat
=
"server"
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
Upon the click of "Save" button in webform (contenturl) , i have to rebind the Tabstrip .
There seems to be no event which triggers the radtabstrip binding event in my MainPage.aspx.
Let me know if there anything available to fix this.
Thanks,
Mani
7 Answers, 1 is accepted
Thanks,
Mani
Could you specify how exactly you are binding your tabstrip? In case you bind it in page load event then it should be bound again once a post-back occurs.
Please try to provide more information regarding you specific scenario, so we could help you out.
Dimitar Terziev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
I want to know how to detect the Postback happening in the "ContentUrl" of the pageview.
Eg. When i hit Save button in the "ContentUrl", i expected that postback will happen Mainpage.aspx, so that i can handle rebinding of tabstrip. But postback is happening only WITHIN the "ContentUrl".
Do you suggest any different approach so that postback happens in Mainpage.aspx, which has the tabstrip and Multipage.
When a click event happens in the contenturl?
Following is the content of Mainpage.aspx page:
<
telerik:RadTabStrip
ID
=
"RadTabStrip1"
SelectedIndex
=
"0"
runat
=
"server"
MultiPageID
=
"RadMultiPage1"
Skin
=
"Outlook"
EnableAjaxSkinRendering
=
"true"
Orientation
=
"VerticalLeft"
ontabclick
=
"RadTabStrip1_TabClick"
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"RadMultiPage1"
runat
=
"server"
SelectedIndex
=
"0"
Height
=
"800"
Width
=
"800">
<
telerik:RadPageView
ID
=
"PageView1"
runat
=
"server"
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
Following is the Mainpage.aspx.cs code:
protected void Page_Load(object sender, EventArgs e)
{
BindTabStrip();
}
private void BindTabStrip()
{
ds = getTabsDataSet();
foreach (DataRow dr in ds.Tables[0].Rows)
{
RadTab tab = new RadTab();
tab.Text =dr["FORM_NAME"].ToString();
tab.Attributes.Add("web_form_id", dr["web_form_id"].ToString());
RadTabStrip1.Tabs.Add(tab);
}
}
protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)
{
ds = getTabsDataSet();
int count = 0;
foreach (DataRow dr in ds.Tables[0].Rows)
{
if (e.Tab.Attributes["web_form_id"].ToString() == dr["web_form_id"].ToString())
{
PageView1.ContentUrl = ResolveUrl(".." + dr["form_url"].ToString());
}
count++;
}
}
Thanks,
Mani
Thanks,
Mani
The behaviour you are experiencing is the default one, when using the ContentUrl property of the RadPageView. When the above mentioned property is used the content of the pageview is rendered in "iframe" and thus when a post-back occurs only the page in the iframe is firing its page load event. If you want the event of the main page to be fired you should use user controls for the content of the pageviews.
Regards,Dimitar Terziev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
The problem with using contenturls is that I can find no way to access the controls on the main page. What I want to do is trigger an update to the radtreeview on the main page when the data on the contenturl page is updated. The approach I want to use is to trap for a linqdatasource updated/inserted/deleted event, and make a call to a method or function on the main page that will rebind the treeview to reflect the changes, similar to the approach below.
public void UpdateContactsTree(object sender)
{
tvContacts.DataBind();
string sessval = (string)Session["NAID"];
RadTreeNode node = tvContacts.FindNodeByValue(sessval);
if (node != null)
{
tvContacts.Focus();
node.Selected = true;
}
}
I tried setting Previouspagetype to the main page on the contenturl, which would expose the method above, but Previouspagetype returns null since the contenturl has focus within the main page but the url has not actually changed.
Is there some other approach you could recommend to trigger re-databinding the treeview when the record has been updated through a contenturl?
In general when you load a page in an iframe, you could not access the controls on the parent page from the code-behind of the page being loaded in the iframe. You could only access them client-side and only when both pages are of one and the same domain otherwise this would not be possible as well due to cross site scripting. My suggestion is to access the main page client-side and then trigger an action which will update the RadTreeView.
Regards,
Dimitar Terziev
the Telerik team