Hello Support
I have used an RadTreeview
It looks like
A
A.1
A.2
A.3
B
B.1
B.2
Now while saving the information user has checked on checkboxes for example A.1 & A.2 only
When he revisits the screen I need to show the checkboxes of A.1 & A.2 has checked. How to do this? Tried many of your forums
all the references is pointing towards following line of code.
Please suggest me where I am getting wrong.
Thanks
I have used an RadTreeview
<
telerik:RadTreeView
x:Name
=
"radTreeView"
Margin
=
"8"
IsTriStateMode
=
"true"
IsOptionElementsEnabled
=
"True"
ItemsOptionListType
=
"CheckList"
DataContext
=
"{StaticResource dataSetProvider}"
ItemsSource
=
"{Binding Group}"
ItemTemplate
=
"{StaticResource MasterTemplate}"
>
</
telerik:RadTreeView
>
It looks like
A
A.1
A.2
A.3
B
B.1
B.2
Now while saving the information user has checked on checkboxes for example A.1 & A.2 only
When he revisits the screen I need to show the checkboxes of A.1 & A.2 has checked. How to do this? Tried many of your forums
all the references is pointing towards following line of code.
for (int i = 0; i < rdGroups.radTreeView.Items.Count; i++)
{
RadTreeViewItem container = rdGroups.radTreeView.ItemContainerGenerator.ContainerFromIndex(i) as RadTreeViewItem;
for (int x = 0; x < container.Items.Count; x++)
{
if ((container.Items[x] as System.Data.DataRowView).Row.ItemArray[0].ToString() == strLocationIds[j])
{
RadTreeViewItem ch = rdGroups.radTreeView.ItemFromContainer(container.Items[x]) as RadTreeViewItem;
ch.CheckState = System.Windows.Automation.ToggleState.On;
//I am getting ch as null. hence it is giving error for object reference.
}
}
}
Please suggest me where I am getting wrong.
Thanks