or
| <asp:UpdatePanel ID="UpdatePanel2" runat="server" onload="UpdatePanel2_Load"> |
| <ContentTemplate> |
| <telerik:RadTreeView ID="rtvLayoutListe" runat="server" AutoPostBack="true" Height="450px" |
| Skin="Office2007" OnClientNodeClicking="ClientClickHandler" |
| oncontextmenuitemclick="rtvLayoutListe_ContextMenuItemClick" |
| OnNodeClick="rtvLayoutListe_NodeClick" |
| onclientcontextmenuitemclicking="ContextMenuClicking" |
| onclientnodeclicked="ClientClickedHandler" |
| onclientnodeeditstart="startEdit" |
| onnodeedit="rtvLayoutListe_NodeEdit" |
| OnClientContextMenuShowing="onClientContextMenuShowing" > |
| <ContextMenus> |
| ... |
| </ContextMenus> |
| </telerik:RadTreeView> |
| </ContentTemplate> |
| <Triggers> |
| <asp:AsyncPostBackTrigger ControlID="btnRefresh" /> |
| </Triggers> |
| </asp:UpdatePanel> |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| if (!IsPostBack) |
| { |
| GenerateTreeView(); |
| } |
| } |
| public void GenerateTreeView() |
| { |
| rtvLayoutListe.Nodes.Clear(); |
| layoutsql lsql = new layoutsql(); |
| DataSet ds = lsql.GetLayoutsForManager(); |
| RadTreeNode rootNode = new RadTreeNode("Layouts", "folder-0"); |
| rootNode.ImageUrl = "../../images/folder.png"; |
| rootNode.ToolTip = "Layouts - Please select a Layout or Container"; |
| rootNode.Expanded = true; |
| rootNode.ContextMenuID = "RootMainContextMenu"; |
| rtvLayoutListe.Nodes.Add(rootNode); |
| foreach (DataRow folderRow in ds.Tables["LayoutFolder"].Rows) |
| { |
| RadTreeNode folderNode = new RadTreeNode(folderRow["LgName"].ToString(), |
| "folder-" + folderRow["lgid"].ToString()); |
| folderNode.ImageUrl = "../../images/folder.png"; |
| folderNode.ToolTip = "Folder"; |
| folderNode.ContextMenuID = "MainContextMenu"; |
| rootNode.Nodes.Add(folderNode); |
| foreach (DataRow layoutRow in folderRow.GetChildRows("FolderLayouts")) |
| { |
| RadTreeNode layoutNode = new RadTreeNode(layoutRow["LName"].ToString(), |
| "layout-" + layoutRow["LID"].ToString()); |
| layoutNode.ImageUrl = "../../images/desktop.png"; |
| layoutNode.ToolTip = "Layout " + layoutRow["LName"].ToString(); |
| layoutNode.ContextMenuID = "LayoutFolderCMenu"; |
| folderNode.Nodes.Add(layoutNode); |
| foreach (DataRow containerRow in layoutRow.GetChildRows("LayoutContainers")) |
| { |
| RadTreeNode containerNode = new RadTreeNode(containerRow["CName"].ToString(), |
| "container-" + containerRow["CID"].ToString()); |
| containerNode.ImageUrl = "../../images/gif.png"; |
| containerNode.ToolTip = "Layout Container " + containerRow["CName"].ToString(); |
| containerNode.ContextMenuID = "EmptyFolderContextMenu"; |
| layoutNode.Nodes.Add(containerNode); |
| } |
| } |
| } |
| int anzahl = rtvLayoutListe.Nodes.Count; =====>>>>>> Always 1 |
| //if (Session["cnewvalue"] != null) |
| //{ |
| // if (int.Parse(Session["cnewvalue"].ToString()) > 0) |
| // { |
| // foreach (RadTreeNode node in rtvLayoutListe.Nodes) |
| // { |
| // if (node.Value == tempcontainer) |
| // { |
| // node.Selected = true; |
| // node.Expanded = true; |
| // } |
| // else |
| // { |
| // node.Selected = false; |
| // } |
| // } |
| // } |
| //} |
| } |
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6.3; .NET CLR 3.5.30729; .NET CLR 3.0.30618; OfficeLiveConnector.1.4; OfficeLivePatch.1.3)
Timestamp: Sun, 29 Nov 2009 15:02:58 UTC
Message: 'childNodes' is null or not an object
Line: 221
Char: 1
Code: 0
URI: ScriptResource.axd?d=JNhyLrLqW0xLaIfAooEFB847ZeDVYQU53nV7V_xFiBSjA1DlaLTQMRGDmaaK8YTJNaraWW2oQrhmxoXEbDP6Lg2&t=8c4884c
i am going around and round in circles trying to fix this, any ideas?! my website is www.prsc.com.au
thanks in advance
| ... |
| <Columns> |
| <telerik:GridBoundColumn DataField="ID_ENTIDAD" HeaderText="Id." ReadOnly="True" SortExpression="ID_ENTIDAD" FilterControlWidth="50px" |
| AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" ShowFilterIcon="false" > |
| </telerik:GridBoundColumn> |
| <telerik:GridTemplateColumn DataField="DSC_ENTIDAD" HeaderText="Entidad" SortExpression="DSC_ENTIDAD" FilterControlWidth="99%" |
| AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false"> |
| ..... |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn [DataField="BOL_ACTIVO"] DataType="System.Boolean" HeaderText="Activo" SortExpression="BOL_ACTIVO" |
| AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" ShowFilterIcon="false"> ..... |
| </telerik:GridTemplateColumn> |
| </column> |