Completed
Last Updated: 31 Aug 2017 12:15 by ADMIN
ADMIN
Ralitsa
Created on: 14 Apr 2015 13:40
Category: TreeView
Type: Feature Request
3
ADD. RadTreeView - binding the check-boxes to support TriStateMode
Currently we do not support binding to the ToggleState.Indeterminate state automatically because it would require a change in the behavior of the Checked property. If you use the CheckedMember, the ToggleState.Indeterminate state is represent like ToggleState.On. 

Workaround: 
Subscribe to the NodeFormatting and NodeCheckedChanged events: 
void radTreeView1_NodeFormatting(object sender, Telerik.WinControls.UI.TreeNodeFormattingEventArgs e)
{
    Child child = e.Node.DataBoundItem as Child;
    if (child != null)
    {
        e.Node.CheckState = child.Status;
    }
}

void radTreeView1_NodeCheckedChanged(object sender, Telerik.WinControls.UI.TreeNodeCheckedEventArgs e)
{
    Child child = e.Node.DataBoundItem as Child;
    if (child != null)
    {
        child.Status = e.Node.CheckState;
    }
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
2 comments
ADMIN
Dess | Tech Support Engineer, Sr.
Posted on: 24 Apr 2017 06:22
Hello Visoot, 

Thank you for writing.

I have tried to reproduce the problem without any success. Feel free to submit a support ticket where you can provide your sample project experiencing the problem and the support team will gladly assist you.
Boy
Posted on: 23 Apr 2017 16:59
Any updates on this issue? I cannot fix with this solution. It throws stack overflow exception.