Hi guys,In all samples of TreePanel in the source code the part in which we create listeners is in html code, but How to do this in code??? Because my tree panel is created dinamically.The part of html code that I need in c# code is in a big letter.
<ext:TreePanel ID="TreePanel1" runat="server" Title="Tree" AutoHeight="true" Border="false"> <Root> <ext:AsyncTreeNode NodeID="0" Text="Root" /> </Root> <Listeners> <BeforeLoad Fn="nodeLoad" /> </Listeners> </ext:TreePanel>
this.TreePanel1.Listeners.BeforeLoad.Fn = "nodeLoad";
[
Coolite.AjaxEvents.MyMethod(Ext.encode({Id: node.id, Text: node.text}))
public class SimpleNode{ public string Id{...} public string Text {...}}
public void MyMethod(SimpleNode node){...