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

Toggle Row Details cell only expands if you click on the plus or minus

3 Answers 115 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 28 Feb 2018, 05:39 PM

This can be seen in the examples, if you have a GridViewToggleRowDetailsColumn then you have a column with plus or minus in it for expanding/collapsing the row. The issue I'm having is that often the click is being missed as it seems you have to click exactly on the text, not just anywhere in the cell. I've seen you can make the details expand on selection, but I don't really want to do this, I'd rather the user clicks on the expansion cell. 

Is there any way to make the whole of the cell clickable?

Interestingly enough I've noticed that the expansion for hierarchical grids is clickable anywhere, but because I've got multiple child details I wanted to have tabs.

3 Answers, 1 is accepted

Sort by
0
Accepted
Yoan
Telerik team
answered on 05 Mar 2018, 09:46 AM
Hello Alex,

In order to achieve the desired behavior, you need to stretch the ToggleButton. This can be done easily by setting VerticalContenteAlignement of the GridViewCell element in which the button resides to Stretch.

You can define the following style:
<Style x:Key="myCellStyle" TargetType="telerik:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}">
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>           
    </Style>

then you can set it explicitly to the GridViewToggleRowDetailsColumn like so:
<telerik:GridViewToggleRowDetailsColumn CellStyle="{StaticResource myCellStyle}"/>

In this way, the toggle button should be stretch in the whole cell and the clickable area should be bigger.

I hope this helps.

Regards,
Yoan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Alex
Top achievements
Rank 1
answered on 05 Mar 2018, 12:23 PM
Thanks, that did it for filling the cell vertically, but there was still a gap down the sides, I removed this using Padding=0.
0
Yoan
Telerik team
answered on 05 Mar 2018, 01:55 PM
Hi Alex,

I am glad to hear that. If you need any further assistance, do not hesitate to contact us again.

Regards,
Yoan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Alex
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Alex
Top achievements
Rank 1
Share this question
or