Unexpected TapAndHold behaviour in GridView

4 posts, 0 answers
  1. Mike
    Mike avatar
    14 posts
    Member since:
    Jan 2011

    Posted 07 Aug 2014 Link to this post

    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
  2. Nick
    Admin
    Nick avatar
    593 posts

    Posted 08 Aug 2014 Link to this post

    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.
     
  3. Mike
    Mike avatar
    14 posts
    Member since:
    Jan 2011

    Posted 08 Aug 2014 in reply to Nick Link to this post

    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
  4. Nick
    Admin
    Nick avatar
    593 posts

    Posted 08 Aug 2014 Link to this post

    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.
     
Back to Top