
Please can you help me with this.
Cheers
kristján
12 Answers, 1 is accepted
May I ask you to test with our latest version - Q3 2012 and let me know if you can still reproduce the problem?
Greetings,Didie
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

I just updated to the newest version and I am still having the same problem.
This is my grid definition
<
telerik:RadTreeListView
x:Name
=
"grid"
Grid.Row
=
"2"
AutoGenerateColumns
=
"False"
RowLoaded
=
"grid_RowLoaded"
IsFilteringAllowed
=
"False"
telerik:StyleManager.Theme
=
"Windows7"
RowIsExpandedChanging
=
"grid_RowIsExpandedChanging"
SelectionChanged
=
"grid_SelectionChanged"
BeginningEdit
=
"grid_BeginningEdit"
CellEditEnded
=
"grid_CellEditEnded"
ContextMenu
=
"{StaticResource RadTreeListViewItemContext}"
SelectionMode
=
"Single"
EnableRowVirtualization
=
"True"
EnableColumnVirtualization
=
"False"
>
<
telerik:RadTreeListView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding IsChecked, Mode=TwoWay}"
IsReadOnly
=
"False"
>
<
telerik:GridViewDataColumn.CellTemplate
>
<
DataTemplate
>
<
CheckBox
IsChecked
=
"{Binding IsChecked, Mode=TwoWay}"
Checked
=
"OnChecked"
Unchecked
=
"OnUnchecked"
IsThreeState
=
"False"
/>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
</
telerik:RadTreeListView.Columns
>
<
telerik:RadTreeListView.ChildTableDefinitions
>
<
telerik:TreeListViewTableDefinition
ItemsSource
=
"{Binding Path=Children}"
/>
</
telerik:RadTreeListView.ChildTableDefinitions
>
</
telerik:RadTreeListView
>
Can you please advice further.
Cheers
kristján
This may happen if you are setting IsExpandable in RowLoaded. Please use Styles and StyleSelectors instead similar to our demos. The tree list expand/collapse now will not destroy/recreate all rows like in the previous versions however will reuse rows and RowLoaded will not be raised for reused rows.
If you still you want to use the previous behavior your can simply set AlternationCount (for example to 2) and in this case all rows will be destroyed/recreated during expand/collapse.
Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

"This may happen if you are setting IsExpandable in RowLoaded. Please use Styles and StyleSelectors instead similar to our demos."
I am setting the IsExpandable in RowLoaded,.
I am not quite sure what you mean. I've been digging in your demo and the only demo I see with anything you are suggesting is the on demand example in witch this code is presented. ps. the example is also using RowLoaded.
<
telerik:RadTreeListView.RowStyleSelector
>
<
telerik:ConditionalStyleSelector
>
<
telerik:StyleRule
Condition
=
"IsEmpty"
>
<
Style
TargetType
=
"telerik:TreeListViewRow"
BasedOn
=
"{StaticResource TreeListViewRowStyle}"
>
<
Setter
Property
=
"IsExpandable"
Value
=
"False"
/>
</
Style
>
</
telerik:StyleRule
>
<
telerik:StyleRule
Condition
=
"Not IsEmpty"
>
<
Style
TargetType
=
"telerik:TreeListViewRow"
BasedOn
=
"{StaticResource TreeListViewRowStyle}"
>
<
Setter
Property
=
"IsExpandable"
Value
=
"True"
/>
</
Style
>
</
telerik:StyleRule
>
</
telerik:ConditionalStyleSelector
>
</
telerik:RadTreeListView.RowStyleSelector
>
And I get a error on StaticResource TreeListViewRowStyle...
I there any way you can provide an example since I'm not quite sure on how to implement this ?
Best regards
Kristján
This example is using style selectors not RowLoaded. Do you have the same problem on our demo?
Regards,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

No, don't have the same problem in the demo, only in my code. this is the inner exception ->
"Cannot find resource named 'TreeListViewRowStyle'. Resource names are case sensitive"
In the demo, I cannot see the TreeListViewRowStyle being declared, am I missing something, is there an help topic about this (did not find any in you help)
Thanks again
Kristján
You can check this article for more info:
http://www.telerik.com/help/wpf/styling-apperance-implicit-styles-overview.html
Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Best regards
Kristján
The article says that if you are using our implicit themes (like our own demos) you can reference our styles directly by using simple rule - class name + "Style".
All the best,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Ok fair, but I am not able to resolve the style via
<telerik:RadTreeListView.RowStyleSelector>
<telerik:ConditionalStyleSelector>
<telerik:StyleRule Condition="IsEmpty">
<Style TargetType="telerik:TreeListViewRow" BasedOn="{StaticResource TreeListViewRowStyle}">
<Setter Property="IsExpandable" Value="False" />
</Style>
</telerik:StyleRule>
<telerik:StyleRule Condition="Not IsEmpty">
<Style TargetType="telerik:TreeListViewRow" BasedOn="{StaticResource TreeListViewRowStyle}">
<Setter Property="IsExpandable" Value="True" />
</Style>
</telerik:StyleRule>
</telerik:ConditionalStyleSelector>
</telerik:RadTreeListView.RowStyleSelector>
The styles are not resolved and I am following your example.
Is TreeListViewRowStyle created somewhere and do I need to reference it somewhere from my point of view this is not clear (using the demo app)?
I've attached the error from my Visual studio, but the solution builds anyway, but crashes as soon as the control that I am working on is opened.
Best regards
Kristján
Are you using implicit themes like we do in our demos? Please check the help article I've sent you once again!
Regards,Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

We do not have one those, feel a bit stupid for not recognizing that earlier, one should not work when being sick. I tried the second method, works fine.
Thanks for your help and patient.