Expanded > icon dissapearing/appearing

13 posts, 1 answers
  1. Kristjan Einarsson
    Kristjan Einarsson avatar
    95 posts
    Member since:
    Jan 2010

    Posted 18 Oct 2012 Link to this post

    Hi, I have some ghosting problem with the TreeListView. Whenever I expand a row most (not all) rows become un-expandable, this can be fixed if I have many rows and can scroll down/up the treelistview.  What can be triggering this behavior I'm running Q2 2012 Sp2.

    Please can you help me with this.

    Cheers
    kristján
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 18 Oct 2012 Link to this post

    Hi,

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Kristjan Einarsson
    Kristjan Einarsson avatar
    95 posts
    Member since:
    Jan 2010

    Posted 18 Oct 2012 Link to this post

    Hi again and thanks for the quick response.
    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
     


  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 19 Oct 2012 Link to this post

    Hello,

     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.

    Greetings,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Kristjan Einarsson
    Kristjan Einarsson avatar
    95 posts
    Member since:
    Jan 2010

    Posted 22 Oct 2012 Link to this post

    Hi again Vlad.
    "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

  7. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 22 Oct 2012 Link to this post

    Hi,

    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.

  8. Kristjan Einarsson
    Kristjan Einarsson avatar
    95 posts
    Member since:
    Jan 2010

    Posted 22 Oct 2012 Link to this post

    Hi,
    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
  9. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 22 Oct 2012 Link to this post

    Hello,

     You can check this article for more info:
    http://www.telerik.com/help/wpf/styling-apperance-implicit-styles-overview.html

    Greetings,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  10. Kristjan Einarsson
    Kristjan Einarsson avatar
    95 posts
    Member since:
    Jan 2010

    Posted 22 Oct 2012 Link to this post

    Thanks for the link, but it does not solve my problem, I was meaning help on the Expand by demand on the TreeListGridView.  I am following the no demand demo example. do I need to reference anything that the demo is not showing me ?

    Best regards
    Kristján



  11. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 22 Oct 2012 Link to this post

    Hi,

     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.

  12. Kristjan Einarsson
    Kristjan Einarsson avatar
    95 posts
    Member since:
    Jan 2010

    Posted 22 Oct 2012 Link to this post

    HI,
    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
  13. Answer
    Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 22 Oct 2012 Link to this post

    Hi,

    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.

  14. Kristjan Einarsson
    Kristjan Einarsson avatar
    95 posts
    Member since:
    Jan 2010

    Posted 22 Oct 2012 Link to this post

    the what now :P
    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.
Back to Top
UI for WPF is Visual Studio 2017 Ready