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

Gesturing on RadGridView for scrolling

11 Answers 202 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 05 Dec 2014, 01:46 PM
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.

11 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 08 Dec 2014, 11:06 AM
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.

 
0
Tim
Top achievements
Rank 1
answered on 09 Dec 2014, 04:33 AM
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
​
0
Tim
Top achievements
Rank 1
answered on 09 Dec 2014, 05:08 AM
We have tried by removing telerik:TouchManager.IsTouchHitTestVisible="False" but still gesturing doesn't work.
0
Tim
Top achievements
Rank 1
answered on 09 Dec 2014, 06:22 AM
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.
0
Nick
Telerik team
answered on 09 Dec 2014, 09:22 AM
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.

 
0
Tim
Top achievements
Rank 1
answered on 11 Dec 2014, 03:57 AM
[quote]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.[/quote]

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.
0
Nick
Telerik team
answered on 11 Dec 2014, 08:35 AM
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.

 
0
Dipti
Top achievements
Rank 1
answered on 15 Dec 2014, 08:57 AM
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
0
Nick
Telerik team
answered on 15 Dec 2014, 10:28 AM
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.

 
0
Dipti
Top achievements
Rank 1
answered on 15 Dec 2014, 12:53 PM
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.
0
Nick
Telerik team
answered on 17 Dec 2014, 11:39 AM
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.

 
Tags
GridView
Asked by
Tim
Top achievements
Rank 1
Answers by
Nick
Telerik team
Tim
Top achievements
Rank 1
Dipti
Top achievements
Rank 1
Share this question
or