Under Review
Last Updated: 25 Mar 2025 08:21 by ADMIN
Jorge
Created on: 18 Mar 2025 11:47
Category: GridView
Type: Bug Report
1
Button Stops Working With Touch Input If Button Cell Is Selected

When adding a button cell as below, if the button cell is selected the button doesn't work when tapping it.

<telerik:GridViewDataColumn Header="Config"
                            DataMemberBinding="{Binding .}" IsReadOnly="True">
    <telerik:GridViewDataColumn.CellTemplate>
        <DataTemplate>
            <!-- Adding telerik:TouchManager.TouchMode="None" solves the issue -->
            <telerik:RadButton HorizontalAlignment="Center" Style="{StaticResource MyButtonStyle}"
                               Margin="2" Padding="1" Width="Auto" Height="Auto"
                               Command="{Binding DataContext.ShowExtraConfigurationCommand, RelativeSource={RelativeSource AncestorType=Window}}"
                               CommandParameter="{Binding .}" ToolTip="Config">
                <telerik:RadGlyph Glyph="{StaticResource GlyphGear}"/>
            </telerik:RadButton>
        </DataTemplate>
    </telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>

As stated in the comment, adding the property below to the RadButton solves the issue.

telerik:TouchManager.TouchMode="None"

I have attached a sample project in which the error occurs, simply tap a button, close the MessageBox and tap the same button again. Thank you for your time!

1 comment
ADMIN
Martin Ivanov
Posted on: 25 Mar 2025 08:21

Hello Jorge,

Thank you for the project.

The described behavior occurs because click in the current cell executes a specific touch-related logic which handles the tap gesture. This means that the gesture is not propagated to the button and nothing happens. 

To avoid this, you can disable the editing of the column using the EditTriggers=None setting instead of IsReadOnly=True.

  <telerik:GridViewDataColumn Header="Config" EditTriggers="None"/>

Or you can use the TouchMode=None. This will disable any TouchManager logic related to the button, but the touch events will be automatically routed to the click events, thus the button will work. However, keep in mind that this approach will bring the reverse problem - the button will steal the tap gesture and the cell won't get it. In other words, on button click, the underlying cell won't get selected.

Can you try these options and let me know how it goes?

Regards,
Martin Ivanov
Progress Telerik

Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!