This is a migrated thread and some comments may be shown as answers.

No Nodes in the CheckedNodes Collection

3 Answers 63 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 05 Aug 2009, 10:12 PM
I have the following treeview that is loaded using LoadXML with the xml string below. The treeview has a server-side
OnNodeCheck event defined which calls "ShowCheckedNodes" (below). The problem i am having is that the event fires
but the reports.CheckNodes property does not return the checked node in the collection.

Thanks Marc

<telerik:RadTreeView ID="reports" Runat="server" BorderColor="Black"  MultipleSelect="false"  
            BorderStyle="Outset" BorderWidth="1px" Skin="Outlook" CheckBoxes="true" CheckChildNodes="false"
                     TriStateCheckBoxes="true" EnableViewState="true"
                    OnClientNodeChecked="ClientNodeClicking"
                     OnClientNodeChecking="onNodeClicked"
                    OnNodeCheck="ShowCheckedNodes"
                   style="z-index: 1; left: 15px; top: 100px; position: absolute; height: 319px; width: 245px"
                   Height="300px" SingleExpandPath="True" Width="275px"
                   ShowLineImages="False" PersistLoadOnDemandNodes="False"
                  EnableEmbeddedScripts="True" EnableAjaxSkinRendering="False">
</telerik:RadTreeView>


{<Tree>
<Node Text="Energy Reports" Value="-1">
<Node Text="Energy Monthly Summary" fm="html"  vc="uc_monthstart,uc_sites" multisite="yes"  ums="no"  Value="RS_@acctid_Benchmark"/>
<Node Text="Comparative Data" fm="excel,htm,pdf"  vc="uc_monthend,uc_sites" multisite="yes"  ums="no"  Value="RS_@acctid_CompData"/>
<Node Text="Comparative Data Input Units" fm="excel"  vc="uc_monthend,uc_sites" multisite="yes"  ums="no"  Value="RS_@acctid_CompData_Entr"/>
<Node Text="Predicted vs Actual Consumption" fm="pdf"  vc="uc_monthend,uc_sites" multisite="yes"  ums="no"  Value="RS_@acctid_PrevsAct"/>
</Node>
<Node Text="Maintenance Reports" Value="-1">
<Node Text="Preventive Maintenance" fm="pdf,html,excel"  vc="uc_monthstart,uc_sites" multisite="no"  ums="no"  Value="RS_@acctid_Pmaint"/>
<Node Text="YTD Preventive Maintenance Compliance" fm="pdf"  vc="uc_monthstart,uc_sites" multisite="no"  ums="no"  Value="RS_@acctid_PmaintYTD"/>
<Node Text="Quarterly Fire and Life Safety" vc="uc_quarter,uc_sites" multisite="no"  ums="yes"  Value="RS_@acctid_FLS"/></Node><Node Text="Budget Reports" Value="-1">
<Node Text="Basic Budget" fm="pdf"  Value="RS_@acctid_Basic"/>
<Node Text="Regression Budget" Value="RS_@acctid_Regression"/>
</Node>
<Node Text="Corporate Reports" Value="-1"><Node Text="Corporate Status Report" vc="uc_number,uc_sites" Value="RS_@AcctID_Status"/>
</Node>
</Tree>}

protected void ShowCheckedNodes(object sender, System.EventArgs e)
    {
        string message = string.Empty;
        foreach (RadTreeNode node in reports.CheckedNodes)
        {
            message += node.FullPath + "<br/>";
        }
    }

3 Answers, 1 is accepted

Sort by
0
Helen
Telerik team
answered on 10 Aug 2009, 03:10 PM
Hi Marc,

We tried to reproduce the problem, but without much success. Please refer to the attached project as part of our local tests.
Could you please modify it so we can see the exact problem you experienced?

Regards,
Helen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Andy
Top achievements
Rank 1
answered on 23 Feb 2010, 03:56 PM
Try this:

PersistLoadOnDemandNodes

 

="true"

Andy

 

0
Derek Hunziker
Top achievements
Rank 1
answered on 14 Jul 2010, 05:58 PM
Ran into this issue today. In my case, I had <pages enableSessionState="ReadOnly"> set in my web.config which was causing this. Removing it did the trick.

I imagine a disabled ViewState would also cause this, but I haven't tested it.
Tags
TreeView
Asked by
Marc
Top achievements
Rank 1
Answers by
Helen
Telerik team
Andy
Top achievements
Rank 1
Derek Hunziker
Top achievements
Rank 1
Share this question
or