Is there a property to know whether all the nodes are checked

2 posts, 0 answers
  1. Tao
    Tao avatar
    13 posts
    Member since:
    Jun 2012

    Posted 28 Jan 2014 Link to this post

    something like radDropDownTree.AllNodesChecked == true.

    Thanks!
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 28 Jan 2014 in reply to Tao Link to this post

    Hi Tao,

    As a work around please have a look into the following code snippet to check whether all nodes are checked or not.

    ASPX:
    <telerik:RadDropDownTree ID="RadDropDowntree1" runat="server" CheckBoxes="SingleCheck"
        DataSourceID="SqlDataSource1" DataFieldID="id" DataFieldParentID="parentid" DataTextField="text">
        <ButtonSettings ShowCheckAll="true" />
    </telerik:RadDropDownTree>
    <telerik:RadButton ID="RadButton1" runat="server" Text="AllChecked" OnClick="RadButton1_Click">
    </telerik:RadButton>

    C#:
    protected void RadButton1_Click(object sender, EventArgs e)
    {
        int flag = 0;
        foreach (RadTreeNode node in RadDropDowntree1.EmbeddedTree.GetAllNodes())
        {
            if (node.Checked == false)
            {
                flag = 1;
                break;
            }
        }
        if (flag == 0)
            Response.Write("all Check"); // all nodes are checked
        else
            Response.Write("Uncheck"); // unchecked nodes are there
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top