This is a migrated thread and some comments may be shown as answers.

GridViewToggleButton not showing in the second level Hierarchical Grid

3 Answers 31 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jerric Lyns John
Top achievements
Rank 1
Jerric Lyns John asked on 11 Mar 2014, 12:58 PM
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

3 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 14 Mar 2014, 09:13 AM
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.

 
0
Jerric Lyns John
Top achievements
Rank 1
answered on 27 Mar 2014, 02:04 PM
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
0
Yoan
Telerik team
answered on 31 Mar 2014, 10:51 AM
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.

 
Tags
General Discussions
Asked by
Jerric Lyns John
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Jerric Lyns John
Top achievements
Rank 1
Share this question
or