How to make PivotGrid as draggable and resizable using Syncfusion plugins?
This KB document explains how to make PivotGrid as draggable and resizable using Syncfusion plugins.
Making PivotGrid as draggable
You can make PivotGrid as draggable by calling the ejDraggable() method in the renderSuccess event.
JavaScript
$("#PivotGrid").ejPivotGrid({
renderSuccess: "DragPivotGrid",
});
ASP
<ej:PivotGrid ID="PivotGrid1" runat="server"> <ClientSideEvents RenderSuccess="DragPivotGrid"/> </ej:PivotGrid>
MVC
@Html.EJ().Pivot().PivotGrid("PivotGrid1").ClientSideEvents(evt => evt.RenderSuccess("DragPivotGrid"))
JavaScript (event for all platforms)
function DragPivotGrid(args) {
$('#PivotGrid').ejDraggable({
helper: function (event) {
return $(event.element);
}
});
}
Making PivotGrid as resizable
You can make PivotGrid as resizable by calling the ejResizable() method in the renderSuccess event.
JavaScript
$("#PivotGrid").ejPivotGrid({
renderSuccess: " ResizePivotGrid",
isResponsive: true
});
ASP
<ej:PivotGrid ID="PivotGrid1" runat="server" IsResponsive="true"> <ClientSideEvents RenderSuccess="ResizePivotGrid"/> </ej:PivotGrid>
MVC
@Html.EJ().Pivot().PivotGrid("PivotGrid1").IsResponsive(true).ClientSideEvents(evt => evt.RenderSuccess("ResizePivotGrid"))
JavaScript (event for all platforms)
function ResizePivotGrid(args) {
$('#PivotGrid').ejResizable({
helper: function (event) {
return $(event.element);
}
});
}