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

Checkboxes

3 Answers 81 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Greg
Top achievements
Rank 1
Greg asked on 14 Jun 2012, 09:22 PM
Hopefully there is a solution out there for our issue.

We have a treeview that can have child nodes, is displayed in a relation way (parent, child etc). However, we do not want the checking of a child node to automatically check the parent node(s).

The treeview is a hierarchical representation of geographical areas and we want to be able to select "Chicago" without automatically selecting "Illinois" and "USA". 

Does anyone know if there is a way to achieve this?

Thanks,

Greg

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Jun 2012, 04:42 AM
Hi Greg,

By default, checking of child node of a RadTreeview do not to automatically check the parent node(s). And if you are setting TriStateCheckBoxes then it will check the parent node(s) as you mentioned.

ASPX:
<telerik:RadTreeView ID="RadTreeViewTrial" runat="server" CheckBoxes="true">
    <Nodes>
      .............
    </Nodes>
</telerik:RadTreeView>

Thanks,
Shinu.
0
Greg
Top achievements
Rank 1
answered on 15 Jun 2012, 11:57 AM
Hi Shinu,

I have tried various combinations of those settings. Even with the current settings (shown below) the behavior is the same. 

<telerik:RadTreeView name="tvAreas" ID="tvAreas" runat="server" BackColor="#FFFFFF"
BorderColor="#CCCCCC" CheckBoxes="True" CheckChildNodes="False" ForeColor="Black"
Height="250px" MultipleSelect="False" TriStateCheckBoxes="False" Width="200px"
DataFieldID="Area_ID" DataFieldParentID="Parent_ID" DataTextField="Area" DataValueField="Company_Area_ID"
BorderStyle="Solid" BorderWidth="1">
</telerik:RadTreeView>
0
Greg
Top achievements
Rank 1
answered on 15 Jun 2012, 12:15 PM
Shinu,

I have found the problem. After binding the data and setting checkboxes the tri-state was being enabled in code behind. Thanks for pointing me in the right direction.

Greg
Tags
TreeView
Asked by
Greg
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Greg
Top achievements
Rank 1
Share this question
or