Hi team,
I want to freeze the drag able headers and prevent user to drag them. I can do it with css using pointer events but I have different report configs in same component (lets say report1 and report2)and I want to prevent dragging for report2 only, so How can I do this with tool options?
e.g. 'Salesperson' and 'Category' fields are draggble by default but i want to prevent them.
Thanks
Hello,
Thank you for your question.
The dragging option can be disabled by specifying the dragging
parameter in the options object:
options: {
grid: {
dragging: false
}
}
Here is a JSFiddle example for illustration.
We would like to mention that moving fields to other sections on the grid ( for example, to rows, columns, ...) is also available through the right-click context menu.
The context menu can be customized via the customizeContextMenu API call.
Please see our customizing context menu tutorial for guidance.
For example, the following will remove all context menu items:
pivot.customizeContextMenu(function(items, data, viewType) {
return [];
});
Here is a JSFiddle example for illustration.
Please let us know if everything works.
Best Regards,
Vera
Thanks Vera!
It works.