Checkboxes

4 posts, 0 answers
  1. Greg
    Greg avatar
    7 posts
    Member since:
    Apr 2012

    Posted 14 Jun 2012 Link to this post

    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
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 14 Jun 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Greg
    Greg avatar
    7 posts
    Member since:
    Apr 2012

    Posted 15 Jun 2012 Link to this post

    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>
  5. Greg
    Greg avatar
    7 posts
    Member since:
    Apr 2012

    Posted 15 Jun 2012 Link to this post

    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
Back to Top