TreeList checkbox checking issue

2 posts, 0 answers
  1. Susi
    Susi avatar
    40 posts
    Member since:
    Jul 2012

    Posted 28 Jun 2012 Link to this post

    Dear All,

     We are developing project using with c sharp  and I have TreeList in my page with checkbox but when i select parent checkbox child checkbox not checked what i need to do solve this..
    my aspx code is
                                   <telerik:RadTreeList ID="radTreelistLocation" runat="server" OnItemDataBound="radTreelistLocation_ItemDataBound"
        AutoGenerateColumns="false" ParentDataKeyNames="ParentLocationId" AllowMultiItemSelection="true"
        ShowTreeLines="true" OnNeedDataSource="RadTreeList1_NeedDataSource" AllowPaging="true"
        PageSize="50" DataKeyNames="ID" AllowSorting="true">
            <telerik:TreeListTemplateColumn UniqueName="locationName" HeaderText="Location Name">
                    <asp:CheckBox ID="chkAssign" runat="server" Checked='<%# Eval("IsChecked") %>' OnCheckedChanged="chkAssign_CheckChanged" />
            <telerik:TreeListTemplateColumn UniqueName="locationName" HeaderText="Location Name">
                    <asp:Label ID="lblLocationName" runat="server" Text='<%#Eval("Name") %>' />
    And My aspx.cs page code is.
            protected void Page_Load(object sender, EventArgs e)
                if (!Page.IsPostBack)
            protected void RadTreeList1_NeedDataSource(object sender, EventArgs e)
                radTreelistLocation.DataSource = _applicationProcess.SelectLocations();
            public void bindGrid()
                List<Location> locationlist = new List<Location>();
                locationlist = _applicationProcess.SelectLocations();
                radTreelistLocation.DataSource = _applicationProcess.SelectLocations();
                ViewState["location"] = locationlist;

    Thanks in Advance..!
  2. Tsvetina
    Tsvetina avatar
    1862 posts

    Posted 02 Jul 2012 Link to this post

    Hi Susi,

    You would need to enable server-side recursive selection in order to select all children when a parent item is selected. Set AllowRecursiveSelection="true" for the RadTreeList control, and also AllowMultiItemSelection="true". 

    You can see how this works in the first RadTreeList in this demo (use the configurator to enable recursive selection): 

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top