GridViewToggleButton not showing in the second level Hierarchical Grid

4 posts, 0 answers
  1. Jerric Lyns John
    Jerric Lyns John avatar
    2 posts
    Member since:
    Oct 2013

    Posted 11 Mar 2014 Link to this post

    Telerik,

                    I have a problem trying to show the GridViewToggleButton in the second level of the Hierarchical Grid, the problem could have been solved if HasHierarchy had a setter. Since this is not achievable through code and because I was able to use WPF Inspector to change the value of HasHierarchy to make the GridViewToggleButton visible, I would like to request you to find me a workaround to solve this issue.

    01.<telerikGrid:GridViewToggleButton MinHeight="24" MinWidth="24" IsHitTestVisible="{Binding IsExpandable, RelativeSource={RelativeSource TemplatedParent}}" Grid.Column="2" IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" telerikGridView:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
    02.    <telerikGrid:GridViewToggleButton.Opacity>
    03.        <Binding Path="IsExpandable" RelativeSource="{RelativeSource TemplatedParent}">
    04.            <Binding.Converter>
    05.                <telerik:BooleanToOpacityConverter/>
    06.            </Binding.Converter>
    07.        </Binding>
    08.    </telerikGrid:GridViewToggleButton.Opacity>
    09.    <telerikGrid:GridViewToggleButton.Visibility>
    10.        <Binding Path="HasHierarchy" RelativeSource="{RelativeSource TemplatedParent}">
    11.            <Binding.Converter>
    12.                <telerik:BooleanToVisibilityConverter/>
    13.            </Binding.Converter>
    14.        </Binding>
    15.    </telerikGrid:GridViewToggleButton.Visibility>
    16.</telerikGrid:GridViewToggleButton>
    17.<Border Grid.Column="2" BorderBrush="#FFB3B3B3" BorderThickness="0,0,1,0" telerikGridView:SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical">
    18.    <Border.Visibility>
    19.        <Binding Path="HasHierarchy" RelativeSource="{RelativeSource TemplatedParent}">
    20.            <Binding.Converter>
    21.                <telerik:BooleanToVisibilityConverter/>
    22.            </Binding.Converter>
    23.        </Binding>
    24.    </Border.Visibility>
    25.</Border>


    Regards,
    Jerric Lyns John

    P.S. The first level Hierarchical Grid works just fine by showing the GridViewToggleButton but when it comes to the second level, it seems somehow internally HasHierarchy is set as False
  2. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 14 Mar 2014 Link to this post

    Hi Jerric ,

    Generally, if you want to conditionally show/hide the toggle button, you can use a RowStyleSelector where you can set which row will be expandable. Please check this online demo for a reference. The same example is available in your local copy of WPF demos.

    Regards,
    Yoan
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jerric Lyns John
    Jerric Lyns John avatar
    2 posts
    Member since:
    Oct 2013

    Posted 27 Mar 2014 in reply to Yoan Link to this post

    Hey Yoan,

    In my case the first level Hierarchical Grid works just fine by showing the GridViewToggleButton but the problem exists only on the second level , it seems somehow internally HasHierarchy is set as False(I have not tried any next levels though).

    If you feel my explanation is not enough please do reply i'll send you my sample project as attachment.

    Regards,
    Jerric Lyns John
  5. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 31 Mar 2014 Link to this post

    Hi Jerric,

    Generally, it would be great if you can send me a small sample with dummy data in order to investigate the issue locally. Once we reproduce it locally we will debug it and will assist you further. In order to attach a project please open a support ticket. Thank you in advance.

    Regards,
    Yoan
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
Back to Top