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:
sender, EventArgs e)
ContentPlaceHolder cph = (ContentPlaceHolder)
RadPanelBar rpb = (RadPanelBar)cph.FindControl(
RadPanelItem itm = (RadPanelItem)rpb.Items;
UserControl uc = (UserControl)itm.FindControl(
RadTreeView rtv = (RadTreeView)uc.FindControl(
rtv.NodeClick += RadTreeView1_NodeClick;
The code works - when stepping through I can see that the TreeView is found - but the event doesn't fire when clicking on a node (-> a breakpoint in RadTreeView1_NodeClick in the content page is not reached).
Is what I'm trying to do not possible? Or does this just need to go somewhere else in the page lifecycle (Page_Init?).
Thx in advance for help and/or pointers!
Rgds - Marcus.