Gesturing on RadGridView for scrolling

13 posts, 0 answers
  1. Tim
    Tim avatar
    10 posts
    Member since:
    Jun 2013

    Posted 05 Dec 2014 Link to this post

    Hi,

    Does WPF RadGridView support gesturing (touch support)? I.e. will scrolling happen if we swipe our finder/stylus on the RadGridView?

    In our application, the grid scrolls with mouse, but when we try to use touch (finger as well as stylus) for scrolling, the grid does not scroll.

    Please advice.

    Thanks.
  2. Nick
    Admin
    Nick avatar
    593 posts

    Posted 08 Dec 2014 Link to this post

    Hi Tim,

    RadGridView supports panning(swipe to scroll) gestures out of the box. Would it be possible to share the exact configuration you have? What is the GridView placed in? 

    Regards,
    Nick
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Tim
    Tim avatar
    10 posts
    Member since:
    Jun 2013

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

    Hi Nick,

    In our WPF application (developed using Telerik’s WPF RAD Controls), we have defined a custom GridView control which uses Telerik's RadGridView (and implements features like quick search, sorting etc.).

    The definition of grid is like this:

    <telerik:RadExpander IsExpanded="{Binding Path=IsDgHeaderExpand, Mode=TwoWay}" telerik:AnimationManager.IsAnimationEnabled="False">
      <Grid>
          <Grid.RowDefinitions>
              <RowDefinition Height="*"/>
              <RowDefinition Height="Auto"/>
          </Grid.RowDefinitions>
          <telerik:RadGridView Grid.Row="0" Name="SearchResultsGrid" ShowColumnSortIndexes="True" IsFilteringAllowed="{Binding ZeeGridVm.IsFilteringAllowed}" ItemsSource="{Binding ElementName=ZeeUserControl, Path=ItemsSource}" CanUserSortColumns="{Binding ZeeGridVm.IsSortable}"                  ColumnWidth="*" VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling"
                       VirtualizingPanel.IsContainerVirtualizable="True"                  SelectionMode="{Binding ZeeGridVm.SelectionMode}" DataLoaded="SearchResultsGrid_DataLoaded"
                       CanUserReorderColumns="{Binding ZeeGridVm.CanUserReorderColumns}" CanUserResizeColumns="{Binding ZeeGridVm.CanUserResizeColumns}"                   SelectedItem="{Binding Path=DocumentSelectedItem, Mode=TwoWay}" ShowGroupFooters="{Binding ZeeGridVm.IsShowGroupFooter}" ShowColumnFooters="{Binding ZeeGridVm.ShowColumnFooters}"                  ShowInsertRow="False" telerik:TouchManager.IsTouchHitTestVisible="False">
              <i:Interaction.Triggers>
                  <i:EventTrigger EventName="SelectionChanged">
                      <i:InvokeCommandAction Command="{Binding SelectedItemChangedCommand}" CommandParameter="{Binding SelectedItems, ElementName=SearchResultsGrid}"/>
                  </i:EventTrigger>
              </i:Interaction.Triggers>
              <telerik:RadGridView.Resources>
                  <Style  TargetType="telerik:GroupHeaderRow">
                      <Setter Property="ShowHeaderAggregates" Value="False"/>
                  </Style>
              </telerik:RadGridView.Resources>
          </telerik:RadGridView>
          <telerik:RadDataPager Grid.Row="1" Source="{Binding Items, ElementName=SearchResultsGrid}" DisplayMode="All" PageSize="{Binding ZeeGridVm.PageSize,Mode=TwoWay}"                    Name="ZeeGridPager" Visibility="{Binding ZeeGridVm.PagerVisibility, Mode=TwoWay}" VerticalAlignment="Center" />
      </Grid>
    </telerik:RadExpander>


    You can get the sample application from this support ticket: http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=877652
  4. Tim
    Tim avatar
    10 posts
    Member since:
    Jun 2013

    Posted 08 Dec 2014 in reply to Tim Link to this post

    We have tried by removing telerik:TouchManager.IsTouchHitTestVisible="False" but still gesturing doesn't work.
  5. Tim
    Tim avatar
    10 posts
    Member since:
    Jun 2013

    Posted 09 Dec 2014 in reply to Tim Link to this post

    Hi Nick,

    I replaced our custom grid control with telerik:RadGridView still gesturing was not working for scrolling on the touch device.
    Our device is a Windows 7 Panasonic Toughpad FZ-M1.

    I notice that we try to use finger or stylus for scrolling the rows get selected. Is the touch event getting redirected to row selection?

    Please advice.
  6. Nick
    Admin
    Nick avatar
    593 posts

    Posted 09 Dec 2014 Link to this post

    Hi Tim,

    I can't seem to be able to reproduce this on my own. I am attaching the sample I used. Can you reproduce it there as well? 



    Regards,
    Nick
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  7. Tim
    Tim avatar
    10 posts
    Member since:
    Jun 2013

    Posted 09 Dec 2014 in reply to Nick Link to this post

    Hi Nick,

    We were able to isolate the issue. This happens when views are loaded into a TabControl.

    In our case the views are loaded as tabs in TabControl. The gesturing doesn't work when the views are placed as TabItem inside the TabControl. We are using Prism.

    I have uploaded the sample at: http://1drv.ms/1z2lbCm

    Please advice.
    Thanks.
  8. Tim
    Tim avatar
    10 posts
    Member since:
    Jun 2013

    Posted 10 Dec 2014 in reply to Tim Link to this post

    Tim said:Hi Nick,

    We were able to isolate the issue. This happens when views are loaded into a TabControl.

    In our case the views are loaded as tabs in TabControl. The gesturing doesn't work when the views are placed as TabItem inside the TabControl. We are using Prism.

    I have uploaded the sample at: http://1drv.ms/1z2lbCm

    Please advice.
    Thanks.


    Hi Nick,
    We are waiting to hear back from you.

    If you are having trouble with running the sample, please follow the following steps to reproduce the issue:
    1) Open ZM.SFA.Tab.All.sln under the All folder. ZM.SFA.Tab.Core project should be the startup project.
    2) Rebuild the solution in Debug mode.
    4) Run the application.

    Thanks.
  9. Nick
    Admin
    Nick avatar
    593 posts

    Posted 11 Dec 2014 Link to this post

    Hello Tim,

    The TabControl is marked as TochHitTestVisible=false by default and you need to set it to true manually in order to be able to get gestures response from the contents.

    Regards,
    Nick
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  10. Dipti
    Dipti avatar
    3 posts
    Member since:
    May 2012

    Posted 15 Dec 2014 in reply to Nick Link to this post

    Hi Nick,

    We specified IsTouchHitTestVisible="True" in the TabControl in Shell.xaml (in the sample in my post above). But still gesturing is not working.
    Please advise.

    Thanks,
    Dipti
  11. Nick
    Admin
    Nick avatar
    593 posts

    Posted 15 Dec 2014 Link to this post

    Hi Tim,

    Adding:
    TouchManager.TouchHitTestInvisibleTypes.UnregisterType(typeof(System.Windows.Controls.TabControl));

    in the Applicaion Startup takes care of the problem. 

    Let me know if this will work for you. 

    Regards,
    Nick
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  12. Dipti
    Dipti avatar
    3 posts
    Member since:
    May 2012

    Posted 15 Dec 2014 in reply to Nick Link to this post

    Thanks Nick.
    Adding this line of code helped when the screen is opened for the first time.
    But if I open multiple screens and return back to the first screen, gesturing stops working. Is there anything else required?

    Also the scrollbar is jerky, it is not a smooth motion. Please advice.
  13. Nick
    Admin
    Nick avatar
    593 posts

    Posted 17 Dec 2014 Link to this post

    Hi Dipti,

    The performance problem is a known one. You can try a couple of thing though. 
    The first one is to set the AutomationManager.AutomationMode to Disabled. The second is to turn of the TabletInputService from TaskManager. 

    As to the other problem I am not able to reproduce it. Can you provide the exact steps that you do in order to observe it?

    Regards,
    Nick
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top