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

Checked items not working

1 Answer 52 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ryan Ositis
Top achievements
Rank 1
Ryan Ositis asked on 29 Sep 2009, 07:42 PM
I'm attempting to use the tri-state checkboxes with the TreeView. I'm able to populate the TreeView easily enough, but I can't seem to get the checked items out. Here's the code:

<

 

telerik:RadTreeView ID="RadTreeView1" runat="server" CheckBoxes="True" TriStateCheckBoxes="True" CheckChildNodes="True" DataTextField="name">

 

 

</telerik:RadTreeView>

 

 

<asp:Button ID="expertiseFilterButton" runat="server" Text="Filter Faculty" OnClick="expertiseFilterButton_Click" />

 

 

<asp:Literal ID="Literal1" runat="server"></asp:Literal>

 


 

-----------------------

 

protected

 

void expertiseFilterButton_Click(object sender, EventArgs e)

 

{

 

string message = "";

 

 

IList<RadTreeNode> nodeCollection = RadTreeView1.GetAllNodes();

 

 

 

foreach (RadTreeNode node in nodeCollection)

 

{

message += node.FullPath +

" - " + node.Checked.ToString() + "<br />";

 

}

Literal1.Text = message;

}

 

-----------------------
No matter which or how many items I check, the node.Checked keeps coming back as False. Any ideas on what I am doing wrong?

 

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 30 Sep 2009, 08:59 AM
Hello Ryan,

I've already answered to the support ticket regarding this issue.

Best wishes,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TreeView
Asked by
Ryan Ositis
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or