How to restrict the splitter resizing in Gantt?
In JavaScript Gantt, the splitter line separates the tree grid and timeline views, and user can set position for this splitter at the initial load. It is also possible to restrict the splitter resizing in Gantt by using the create client-side event.
User can define the position for the splitter at initial load either by using splitterSettings.position or by splitterSettings.index properties.
splitterSettings.position property allows the user to define the splitter position in percentage or pixel values of the Gantt container’s width. splitterSettings.index property allows the user to define the splitter position based on the treegrid’s column index.
<div id="GanttContainer" style="height:450px;width:700px"></div> <script type="text/javascript"> $("#GanttContainer").ejGantt({ //… splitterSettings:{position:"170px"}, create: function () { $("#GanttContainer").find(".e-splitbar").removeClass("e-resize"); }, }); </script>
The below screen shot depicts the splitter position set at 170px of the Gantt’s width
You can also find a sample to set the splitter position and to restrict the resizing here.
Conclusion
I hope you enjoyed learning about how to restrict the splitter resizing in Gantt.
You can refer to our JavaScript Gantt feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our JavaScript Gantt example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!