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

Unexpected TapAndHold behaviour in GridView

3 Answers 142 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 07 Aug 2014, 07:16 AM
Hi,

We have a usercontrol containing a RadGridView. One of the columns has a dropdown. When we run this on a touch device and we touch the dropdown, the TapAndhold image (the circle) is being shown. According to the documentation this TapAndHold control would only appear after 1,5 seconds, but in our case is appears right away after the contents of the dropdown are shown.

The version of the controls we use is  2014.1.0224.40.

The grid in XAML:
<telerik:RadGridView x:Name="gridViewChars"
                                        AutoGenerateColumns="False"
                                        CanUserDeleteRows="False"
                                        CanUserFreezeColumns="False"
                                        CanUserInsertRows="False"
                                        CanUserReorderColumns="False"
                                        CanUserSelect="True"
                                        CanUserSortColumns="False"
                                        DragElementAction="None"
                                        IsFilteringAllowed="False"
                                        IsReadOnly="False"
                                        Margin="0,10,0,0"
                                        RowIndicatorVisibility="Collapsed"
                                        ShowGroupPanel="False"
                                        ColumnWidth="*"
                                        ItemsSource="{Binding CurrentChapter.CurrentChapterOperation.CharacteristicList, Mode=OneWay}"
                                        EditTriggers="None"
                                        ValidatesOnDataErrors="None">
                <telerik:RadGridView.Columns>
                    <telerik:GridViewDataColumn IsReadOnly="True"
                                                Header="{lex:LocText Key=INSPECTIONDETAIL_CHAR_DESCRIPTION, Dict=Resources, Assembly=MQM_Win32Resources}"
                                                CellTemplate="{StaticResource DescriptionTemplate}"
                                                MaxWidth="400"
                                                />
                    <telerik:GridViewDataColumn Header="{lex:LocText Key=INSPECTIONDETAIL_CHAR_VALUE, Dict=Resources, Assembly=MQM_Win32Resources}"
                                                CellTemplateSelector="{StaticResource CharTemplateSelector}"
                                                MaxWidth="400"
                                                />
                    <telerik:GridViewDataColumn IsReadOnly="True"
                                                Header="{lex:LocText Key=INSPECTIONDETAIL_CHAR_UNIT, Dict=Resources, Assembly=MQM_Win32Resources}"
                                                DataMemberBinding="{Binding Unit, Mode=OneWay}"
                                                MaxWidth="80" />
                    <telerik:GridViewDataColumn IsReadOnly="True"
                                                Header="{lex:LocText Key=INSPECTIONDETAIL_CHAR_REFVAL, Dict=Resources, Assembly=MQM_Win32Resources}"
                                                IsVisible="{Binding Path=ShowReferenceData}"
                                                CellTemplate="{StaticResource RefValTemplate}"
                                                MaxWidth="40" />
                    <telerik:GridViewDataColumn CellTemplate="{StaticResource TypeAsLabelTemplate}"
                                                Header="{lex:LocText Key=INSPECTIONDETAIL_CHAR_TYPE, Dict=Resources, Assembly=MQM_Win32Resources}"
                                                MinWidth="100"
                                                MaxWidth="120"/>
                    <!--<telerik:GridViewDataColumn IsReadOnly="True" Header="{lex:LocText Key=INSPECTIONDETAIL_CHAR_HISTORY, Dict=Resources, Assembly=MQM_Win32Resources}" CellTemplate="{StaticResource HistoryTemplate}"/>-->
                    <telerik:GridViewDataColumn CellTemplate="{StaticResource CannotAnswerButtonTemplate}"
                                                IsVisible="{Binding Path=ShowNAButton}"
                                                MaxWidth="60" />
                    <telerik:GridViewDataColumn CellTemplate="{StaticResource AddPhotoButtonTemplate}" MaxWidth="60"/>
                    <telerik:GridViewDataColumn CellTemplate="{StaticResource ShowDocumentationButtonTemplate}" MaxWidth="60"/>
                </telerik:RadGridView.Columns>
            </telerik:RadGridView>


The datatemplate for the column which contains the dropdown:

<DataTemplate>
                    <AdornerDecorator>
                        <telerik:RadComboBox DisplayMemberPath="Name"
                                             IsEditable="False"
                                             IsEnabled="{Binding Path=IsEnabled, Mode=OneWay}"
                                             ItemsSource="{Binding SelectionList}"
                                             Margin="0,0,40,0"
                                             OpenDropDownOnFocus="True"
                                             SourceUpdated="OnSourceUpdated"
                                             ToolTip="{StaticResource TooltipValue}"
                                             ToolTipService.HorizontalOffset="15"
                                             ToolTipService.VerticalOffset="15"
                                             ToolTipService.Placement="Right">
                            <telerik:RadComboBox.SelectedItem>
                                <Binding Path="Selection"
                                         Mode="TwoWay"
                                         NotifyOnSourceUpdated="True"
                                         UpdateSourceTrigger="PropertyChanged"
                                         ValidatesOnDataErrors="True" />
                            </telerik:RadComboBox.SelectedItem>
                        </telerik:RadComboBox>
                    </AdornerDecorator>
                </DataTemplate>

The style for the RadgridView:

<Style TargetType="{x:Type telerik:RadGridView}">
    <Setter Property="telerik:StyleManager.Theme"
            Value="Windows8Touch" />
    <Setter Property="IsLocalizationLanguageRespected"
            Value="False" />
    <Setter Property="telerik:TouchManager.IsTouchHitTestVisible"
            Value="False" />
</Style>

Is this a bug or did we do something wrong?

Kind regards,
Mike Overmeijer

3 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 08 Aug 2014, 11:24 AM
Hi Mike,

I am not able to reproduce the problem at my side, however I noticed you don't use RadGridView's internal touch logic at all. 
<Style TargetType="{x:Type telerik:RadGridView}">
    <Setter Property="telerik:TouchManager.IsTouchHitTestVisible"
            Value="False" />
</Style>

If this is the case with the whole application, you can disable the TouchManager generally by setting 
TouchManager.IsTouchEnabled to false in the Application constructor, which will take care of the problem. 

Hope this helps. 

Regards,
Nik
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Mike
Top achievements
Rank 1
answered on 08 Aug 2014, 11:42 AM
Hi Nik,

We added the "telerik:TouchManager.IsTouchHitTestVisible=false" based upon another issue which have posted and had to do with certain touch issues. Telerik advised to add this to the gridview and it solved the issue at that point. It had to do with the gridview not responding correctly to panning/scrolling. We definitely need touch support.

Kind regards,
Mike
0
Nick
Telerik team
answered on 08 Aug 2014, 02:20 PM
Hello Mike,

Thank you for the update. Unfortunately without being able to reproduce the problem, we cannot find the exact source of the issue, and therefore cannot fix it. Is it possible to upload a small sample where we can reproduce it? 

On a side note, setting TouchManager.IsTouchEnabled to false will only disable TouchHandling on our side. If you have any custom touch logic, it should not be affected. 


Regards,
Nik
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Mike
Top achievements
Rank 1
Answers by
Nick
Telerik team
Mike
Top achievements
Rank 1
Share this question
or