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

CheckBoxes Problem

5 Answers 73 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Dogu
Top achievements
Rank 1
Dogu asked on 11 Mar 2008, 11:40 AM
hi,

in tree statemode checkboxes are not displayed starting from level 3. I am doing someting wrong ?

dogu tumerdem

5 Answers, 1 is accepted

Sort by
0
Dogu
Top achievements
Rank 1
answered on 11 Mar 2008, 12:01 PM
private void DataBindCategoryTree()
{
    bindCategories.DataSource =     ViewContext.GetSubCategories();
    treeCategory.DataSource = bindCategories;
    treeCategory.DisplayMember = "Name";
    treeCategory.ValueMember = "OID";
    treeCategory.ParentIDMember = "OIDParent";
    treeCategory.CheckBoxes = true;
    treeCategory.TriStateMode = true;treeCategory.ExpandAll();
}




I am calling this function on form load. at that time no problem. when I add or remove a node I call this function again. but the sibling nodes of the added nodes loses checkboxes...


0
Martin Vasilev
Telerik team
answered on 11 Mar 2008, 06:11 PM
Hello dogu.tumerdem,

Thank you for writing.

Unfortunately I was not able to reproduce this issue. Could you please provide more information on it? How do you add/remove the new nodes?

I am looking forward to your reply. 


 
Best wishes,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Brian
Top achievements
Rank 1
answered on 08 Sep 2008, 02:14 PM
I am having a similar issue, except the checkboxes are only displayed at the first level.

This is how I am adding the nodes:

newNode =

New Telerik.WinControls.UI.RadTreeNode(nodeName)
parentNode.Nodes.Add(newNode)


What am I  doing wrong?

0
Brian
Top achievements
Rank 1
answered on 08 Sep 2008, 02:24 PM
I just figured it out.  I need to use the following before assigning the node to the parent:

newNode.ChildListType = Telerik.WinControls.UI.ChildListType.CheckList

0
Martin Vasilev
Telerik team
answered on 11 Sep 2008, 07:50 AM
Hi Brian,

Thank you for writing.

I am glad about that you have resolve the issue.

Could you share with us whether you set the RadTreeView.CheckBoxes property to true before applying a new node? This should force adding a check box to any new node without the need of setting ChildListType for every new node to CheckList.


Kind regards,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Treeview
Asked by
Dogu
Top achievements
Rank 1
Answers by
Dogu
Top achievements
Rank 1
Martin Vasilev
Telerik team
Brian
Top achievements
Rank 1
Share this question
or