I've got a tree populateondemand in a splitter.
I want that:
- clicking on node -> generate populateondemand;
- clicking on leaf -> splitterpane collapse.
I put my tree inside CallbackPanel2, so if i click on node only tree is generated.
I put my splitter inside CallbackPanel1, so if i click on leaf i call from c# the treepane collapse.
This is the code, everything works, but splitterpane doesn't collapse. I don't understand how to set the codebehind as triggers of CallbackPanel1.
Code: HTML/ASPX
<eo:CallbackPanel runat="server" id="CallbackPanel1" Triggers="{ControlID:TVABD;Parameter:}">
<eo:Splitter ID="Splitter" runat="server" >
<eo:SplitterPane ID="TreePane" runat="server" State="Visible">
<eo:CallbackPanel runat="server" id="CallbackPanel2" ChildrenAsTriggers="true">
<eo:TreeView ID="TVABD" runat="server" RaisesServerEvent="True"
onitempopulate="TVABD_ItemPopulate" OnItemClick="TVABD_ItemClick" >
<LookNodes>
<eo:TreeNode ItemID="_Default"/>
</LookNodes>
</eo:TreeView>
</eo:CallbackPanel>
</eo:SplitterPane>
<eo:SplitterPane ID="ContentPane" runat="server">
...
</eo:SplitterPane>
</eo:Splitter>
</eo:CallbackPanel>
Code: C#
protected void TVABD_ItemClick(object sender, EO.Web.NavigationItemEventArgs e)
{
if (e.TreeNode.Value.ToString() != "")
TreePane.State = EO.Web.SplitterPaneState.Collapsed;
else
TreePane.State = EO.Web.SplitterPaneState.Visible;
}
Thanks for help!