Scrolling in Gantt Control
18 Nov 20181 minute to read
The scrollbar will be displayed in the gantt when content exceeds the element width or height. The vertical and horizontal scrollbars will be displayed based on the following criteria:
- The vertical scrollbar appears when the total height of rows present in the gantt exceeds its element height.
- The horizontal scrollbar appears when the sum of columns width exceeds the grid pane size.
- The
heightandwidthare used to set the gantt height and width, respectively.
NOTE
Set width and height
To specify the width and height of the scroller in the pixel, set the pixel value to a number.
The following code example shows how to set height and width in the Gantt control:
Responsive with the parent container
Specify the width and height as 100% to make the gantt element fill its parent container.
Setting the height to 100% requires the gantt parent element to have explicit height.
The following code example shows how to set height and width in the Gantt control:
Scroll To Date method
In the Gantt control, When We use the scrollToDate method, it will scroll the timeline horizontally to the date that we specified in the method’s argument.
The following code examples show how the scroll To Date method works in Gantt:
Set the vertical scroll position
In the Gantt control, you can set the vertical scroller position dynamically by clicking the custom button using the setScrollTop method.