or
Hi There
I have master/content page with two ContentPlaceHolders: Nav and Main. both Nav and Main contain UserControls, where Nav has a navigation UserControl (RadPanel with RadTreeView) and Main has a RadGrid (kind of obvious, right ;-) ).
Obviously the objective is to populate the RadGrid with data dependent on the node that is clicked.
Instead of bubbling up events from the user controls, which I find awkward, I thought I could put the NodeClick Event Handler in the code behind on the content page and assign the event handler in the page load event:
protected
void
Page_Load(
object
sender, EventArgs e)
{
if
(!Page.IsPostBack)
{
ContentPlaceHolder cph = (ContentPlaceHolder)
this
.Master.FindControl(
"ContentPlaceHolderNav"
);
RadPanelBar rpb = (RadPanelBar)cph.FindControl(
"RadPanelBar1"
);
RadPanelItem itm = (RadPanelItem)rpb.Items[1];
UserControl uc = (UserControl)itm.FindControl(
"Nav"
);
RadTreeView rtv = (RadTreeView)uc.FindControl(
"RadTreeView2"
);
rtv.NodeClick += RadTreeView1_NodeClick;
}
}
<
telerik:RadAjaxManagerProxy
ID
=
"RadAJAXManagerProxy1"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"_btnGo"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"rgBalances"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>