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
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.
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
​
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.
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.
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.
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.
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
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.
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.
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.