4 Answers, 1 is accepted
Hi, Alan,
Please set the RadGridView.EnableGestures property to false. In addition, make sure that the EnableKineticScrolling property is also set to false. Thus, you wouldn't scroll the view with moving the mouse with left button down.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Thanks for the reply! I need to handle panning but in a different way, other than scrolling. So, it needs to be enabled as a gesture. Is there a way to disassociate scrolling from the panning or to override the behavior that panning has on the grid?
Thanks again!
Alan
If the pan gesture is enabled and you want to plug into the default logic, first make sure that the EnableKineticScrolling property is set to false. Thus, you will prevent the scrolling.
Then, you can create a derivative of RadGridView and override its OnPanGesture method. There, you can introduce the desired logic you need.
An alternative approach is to create a custom TableViewDefinition and override its CreateViewUIElement method where you can replace the default GridTableElement with a custom one:
public class CustomTableViewDefinition : TableViewDefinition
{
public override IRowView CreateViewUIElement(GridViewInfo viewInfo)
{
return new CustomGridTableElement();
}
}
public class CustomGridTableElement : GridTableElement
{
protected override Type ThemeEffectiveType
{
get
{
return typeof(GridTableElement);
}
}
protected override void OnPanGesture(PanGestureEventArgs args)
{
//TODO
base.OnPanGesture(args);
}
}
Should you have further questions please let me know.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Thank you Dess! That worked!
Alan