Jul 24, 2012, 5:42 PM
[CLOSED] Trying to access a control with 'X.GetCmp<TreePanel>("TreePanel1")' when I added it dynamically
I added a TreePanel form the code behind like the snippet below:
.cs
I CAN'T access 'TreePanel1' with the code below, is 'null'
.cs
protected void Page_Load(object sender, EventArgs e)
{
var tree = new TreePanel();
PlaceHolder1.Controls.Add(tree);
tree.ID = "TreePanel1";
...
}
.aspx <asp:PlaceHolder ID="PlaceHolder1" runat="server" />
I CAN'T access 'TreePanel1' with the code below, is 'null'
var tree = X.GetCmp<TreePanel>("TreePanel1").GetSelectionModel();
Last edited by Daniil; Jul 31, 2012 at 12:43 PM.
Reason: [CLOSED]