\Kendo\UI\Gantt

A PHP wrapper for Kendo UI Gantt.

Inherits from \Kendo\UI\Widget.

Usage

To use Gantt in a PHP page instantiate a new instance, configure it via the available configuration methods and output it by echo-ing the result of the render method.

Using Kendo Gantt

<?php
// Create a new instance of Gantt and specify its id
$gantt = new \Kendo\UI\Gantt('Gantt');

// Configure it
$gantt->autoBind(true)

// Output it

echo $gantt->render();
?>

Methods

addEvent

Fired when a new task or a new dependency is about to be added.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the add event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->addEvent('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onAdd(e) {
        // handle the add event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->addEvent('onAdd');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->addEvent(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

assignments

The configuration of the assignments of the gantt resources. An assignment is a one-to-one mapping between a gantt task and a gantt resource containing the number of units for which a resource is assigned to a task.

Returns

\Kendo\UI\Gantt

Parameters

$value \Kendo\UI\GanttAssignments|array

Example - using \Kendo\UI\GanttAssignments

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$assignments = new \Kendo\UI\GanttAssignments();
$dataResourceIdField = 'value';
$assignments->dataResourceIdField($dataResourceIdField);
$gantt->assignments($assignments);
?>

Example - using array

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$dataResourceIdField = 'value';
$gantt->assignments(array('dataResourceIdField' => $dataResourceIdField));
?>

autoBind

If set to false the widget will not bind to the data source during initialization. In this case data binding will occur when the change event of the data source is fired. By default the widget will bind to the data source specified in the configuration.

Returns

\Kendo\UI\Gantt

Parameters

$value boolean

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->autoBind(true);
?>

cancel

Fired when the user cancels tasks's cell editing by pressing the 'Esc' key.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the cancel event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->cancel('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onCancel(e) {
        // handle the cancel event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->cancel('onCancel');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->cancel(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

change

Fired when the user selects a task in the Gantt.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the change event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->change('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onChange(e) {
        // handle the change event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->change('onChange');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->change(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

columnHide

Fires when the user hides a column. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the columnHide event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnHide('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onColumnHide(e) {
        // handle the columnHide event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnHide('onColumnHide');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnHide(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

columnMenu

If set to true, the Gantt displays the column menu when the user clicks the Chevron icon in the column headers. The column menu allows the user to show and hide columns, and, if filtering and sorting are enabled, filter and sort the data. By default, the column menu is disabled. Can be set to a JavaScript object which represents the column menu configuration.

Returns

\Kendo\UI\Gantt

Parameters

$value boolean|

Example - using boolean

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnMenu(true);
?>

columnReorder

Fires when the user changes the order of a column. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the columnReorder event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnReorder('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onColumnReorder(e) {
        // handle the columnReorder event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnReorder('onColumnReorder');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnReorder(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

columnResize

Fired when the user resizes a column.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the columnResize event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnResize('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onColumnResize(e) {
        // handle the columnResize event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnResize('onColumnResize');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnResize(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

columnResizeHandleWidth

Defines the width of the column resize handle in pixels. Apply a larger value for easier grasping.

Returns

\Kendo\UI\Gantt

Parameters

$value float

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnResizeHandleWidth(1);
?>

columnShow

Fires when the user shows a column. The event handler function context (available through the this keyword) will be set to the widget instance. For additional information check the columnShow event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnShow('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onColumnShow(e) {
        // handle the columnShow event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnShow('onColumnShow');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->columnShow(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

addColumn

Adds one or more GanttColumn to the Gantt.

Returns

\Kendo\UI\Gantt

Parameters

$value[, $value2, ...] \Kendo\UI\GanttColumn|array

Example - using \Kendo\UI\GanttColumn

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$column = new \Kendo\UI\GanttColumn();
$draggable = true;
$column->draggable($draggable);
$gantt->addColumn($column);
?>

Example - using array

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$draggable = true;
$gantt->addColumn(array('draggable' => $draggable));
?>

Example - adding more than one GanttColumn

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$first  = new \Kendo\UI\GanttColumn();
$second = new \Kendo\UI\GanttColumn();
$gantt->addColumn($first, $second);
?>

currentTimeMarker

If set to false the "current time" marker of the Gantt would not be displayed.

Returns

\Kendo\UI\Gantt

Parameters

$value boolean|\Kendo\UI\GanttCurrentTimeMarker|array

Example - using boolean

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->currentTimeMarker(true);
?>

Example - using \Kendo\UI\GanttCurrentTimeMarker

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$currentTimeMarker = new \Kendo\UI\GanttCurrentTimeMarker();
$updateInterval = 1;
$currentTimeMarker->updateInterval($updateInterval);
$gantt->currentTimeMarker($currentTimeMarker);
?>

Example - using array

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$updateInterval = 1;
$gantt->currentTimeMarker(array('updateInterval' => $updateInterval));
?>

dataBinding

Fired before the widget binds to its data source.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the dataBinding event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->dataBinding('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDataBinding(e) {
        // handle the dataBinding event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->dataBinding('onDataBinding');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->dataBinding(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

dataBound

Fired when the widget is bound to data from its data source.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the dataBound event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->dataBound('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onDataBound(e) {
        // handle the dataBound event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->dataBound('onDataBound');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->dataBound(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

dataSource

Sets the data source of the widget.

Returns

\Kendo\UI\Gantt

Parameters

$value \Kendo\Data\DataSource|array

Example - using \Kendo\Data\DataSource

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$dataSource = new \Kendo\Data\DataSource();
$gantt->dataSource($dataSource);
?>

Example - using array

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$schema = new \Kendo\Data\DataSourceSchema();
$gantt->dataSource(array('schema' => $schema));
?>

date

If set to some date and it is between the range start and range end of the selected view, the timeline of the currently selected view is scrolled to start from this date.

Returns

\Kendo\UI\Gantt

Parameters

$value date

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->date(new date());
?>

dependencies

The data source of the widget which contains the dependencies. Can be a JavaScript object which represents a valid data source configuration, a JavaScript array or an existing kendo.data.GanttDependencyDataSource instance.If the dependencies option is set to a JavaScript object or array the widget will initialize a new kendo.data.GanttDependencyDataSource instance using that value as data source configuration.If the dependencies option is an existing kendo.data.GanttDependencyDataSource instance the widget will use that instance and will not initialize a new one.

Returns

\Kendo\UI\Gantt

Parameters

$value |array|

Example - using

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->dependencies(new ());
?>

Example - using array

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->dependencies(array());
?>

edit

Fired when the user starts task edit upon double click on a cell.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the edit event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->edit('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onEdit(e) {
        // handle the edit event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->edit('onEdit');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->edit(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

editable

If set to false the user won't be able to create, modify or delete tasks and dependencies.

Returns

\Kendo\UI\Gantt

Parameters

$value boolean|\Kendo\UI\GanttEditable|array

Example - using boolean

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->editable(true);
?>

Example - using \Kendo\UI\GanttEditable

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$editable = new \Kendo\UI\GanttEditable();
$clickMoveClick = true;
$editable->clickMoveClick($clickMoveClick);
$gantt->editable($editable);
?>

Example - using array

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$clickMoveClick = true;
$gantt->editable(array('clickMoveClick' => $clickMoveClick));
?>

filterable

If set to true, the user can filter the data source by using the Gantt filter menu. By default, filtering is disabled. Can be set to a JavaScript object which represents the filter menu configuration.

Returns

\Kendo\UI\Gantt

Parameters

$value boolean|

Example - using boolean

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->filterable(true);
?>

height

The height of the widget. Numeric values are treated as pixels.

Returns

\Kendo\UI\Gantt

Parameters

$value float|string

Example - using float

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->height(1);
?>

Example - using string

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->height('value');
?>

hourSpan

The span of an hour slot.

Returns

\Kendo\UI\Gantt

Parameters

$value float

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->hourSpan(1);
?>

listWidth

The width of the task list. Numeric values are treated as pixels.

Returns

\Kendo\UI\Gantt

Parameters

$value string|float

Example - using string

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->listWidth('value');
?>

Example - using float

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->listWidth(1);
?>

messages

The configuration of the Gantt messages. Use this option to customize or localize the Gantt messages.

Returns

\Kendo\UI\Gantt

Parameters

$value \Kendo\UI\GanttMessages|array

Example - using \Kendo\UI\GanttMessages

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$messages = new \Kendo\UI\GanttMessages();
$cancel = 'value';
$messages->cancel($cancel);
$gantt->messages($messages);
?>

Example - using array

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$cancel = 'value';
$gantt->messages(array('cancel' => $cancel));
?>

move

Fired when the user is moving a task.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the move event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->move('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onMove(e) {
        // handle the move event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->move('onMove');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->move(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

moveEnd

Fired when the user stops moving a task.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the moveEnd event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->moveEnd('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onMoveEnd(e) {
        // handle the moveEnd event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->moveEnd('onMoveEnd');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->moveEnd(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

moveStart

Fired when the user starts to drag a task.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the moveStart event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->moveStart('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onMoveStart(e) {
        // handle the moveStart event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->moveStart('onMoveStart');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->moveStart(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

If set to true the user could navigate the widget using the keyboard. By default keyboard navigation is enabled.

Returns

\Kendo\UI\Gantt

Parameters

$value boolean

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->navigatable(true);
?>

Fired when the user changes the selected view of the Gantt.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the navigate event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->navigate('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onNavigate(e) {
        // handle the navigate event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->navigate('onNavigate');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->navigate(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

pdf

Configures the Kendo UI Gantt PDF export settings.

Returns

\Kendo\UI\Gantt

Parameters

$value \Kendo\UI\GanttPdf|array

Example - using \Kendo\UI\GanttPdf

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$pdf = new \Kendo\UI\GanttPdf();
$author = 'value';
$pdf->author($author);
$gantt->pdf($pdf);
?>

Example - using array

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$author = 'value';
$gantt->pdf(array('author' => $author));
?>

pdfExport

Fired when the user clicks the "Export to PDF" toolbar button. For additional information check the pdfExport event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->pdfExport('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onPdfExport(e) {
        // handle the pdfExport event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->pdfExport('onPdfExport');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->pdfExport(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

range

Configures the Kendo UI Gantt range settings.

Returns

\Kendo\UI\Gantt

Parameters

$value \Kendo\UI\GanttRange|array

Example - using \Kendo\UI\GanttRange

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$range = new \Kendo\UI\GanttRange();
$end = new date();
$range->end($end);
$gantt->range($range);
?>

Example - using array

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$end = new date();
$gantt->range(array('end' => $end));
?>

remove

Fired when a task or a dependency is about to be removed.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the remove event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->remove('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onRemove(e) {
        // handle the remove event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->remove('onRemove');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->remove(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

reorderable

If set to true, the user can reorder the columns in the GanttList section of the widget by dragging their header cells. By default, reordering is disabled.

Returns

\Kendo\UI\Gantt

Parameters

$value boolean

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->reorderable(true);
?>

resizable

If set to true allows users to resize columns by dragging their header borders. By default resizing is disabled.

Returns

\Kendo\UI\Gantt

Parameters

$value boolean

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->resizable(true);
?>

resize

Fired when the user is resizing a task.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the resize event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->resize('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onResize(e) {
        // handle the resize event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->resize('onResize');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->resize(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

resizeEnd

Fired when the user releases the mouse after resizing a task.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the resizeEnd event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->resizeEnd('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onResizeEnd(e) {
        // handle the resizeEnd event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->resizeEnd('onResizeEnd');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->resizeEnd(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

resizeStart

Fired when the user starts to resize a task.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the resizeStart event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->resizeStart('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onResizeStart(e) {
        // handle the resizeStart event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->resizeStart('onResizeStart');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->resizeStart(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

resources

The configuration of the gantt resource(s). A gantt resource is optional metadata that can be associated with a gantt task.

Returns

\Kendo\UI\Gantt

Parameters

$value \Kendo\UI\GanttResources|array

Example - using \Kendo\UI\GanttResources

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$resources = new \Kendo\UI\GanttResources();
$dataColorField = 'value';
$resources->dataColorField($dataColorField);
$gantt->resources($resources);
?>

Example - using array

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$dataColorField = 'value';
$gantt->resources(array('dataColorField' => $dataColorField));
?>

rowHeight

The height of the table rows. Numeric values are treated as pixels.

Returns

\Kendo\UI\Gantt

Parameters

$value float|string

Example - using float

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->rowHeight(1);
?>

Example - using string

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->rowHeight('value');
?>

save

Fired when a task field is updated upon user interaction.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the save event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->save('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onSave(e) {
        // handle the save event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->save('onSave');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->save(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

selectable

If set to false the user won't be able to select tasks in the Gantt. By default selection is enabled and triggers the change event.

Returns

\Kendo\UI\Gantt

Parameters

$value boolean

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->selectable(true);
?>

showPlannedTasks

If set to true, the Gantt Timeline will render both the planned and the actual execution of tasks. In order to display properly, the Planned vs. Actual view would need the plannedStart and plannedEnd date fields for tasks to be set.

Returns

\Kendo\UI\Gantt

Parameters

$value boolean

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->showPlannedTasks(true);
?>

showWorkDays

If set to false, Gantt views will show all days of the week. By default the views display only business days.

Returns

\Kendo\UI\Gantt

Parameters

$value boolean

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->showWorkDays(true);
?>

showWorkHours

If set to false, the day view will show all hours of the day. By default the view displays only business hours.

Returns

\Kendo\UI\Gantt

Parameters

$value boolean

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->showWorkHours(true);
?>

snap

If set to true the Gantt will snap tasks to the nearest slot during dragging (resizing or moving). Set it to false to allow free moving and resizing of tasks.

Returns

\Kendo\UI\Gantt

Parameters

$value boolean

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->snap(true);
?>

taskTemplate

The template used to render the gantt tasks.The fields which can be used in the template are the task fields

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->taskTemplate('value');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->taskTemplate(new \Kendo\JavaScriptFunction('function() { }'));
?>

togglePlannedTasks

The event will be raised upon Toolbar PlannedTasks Switch click. As a result, the planned tasks will be either hidden or shown in the Gantt Timeline view. The event is preventable.The event handler function context (available via the this keyword) will be set to the widget instance. For additional information check the togglePlannedTasks event documentation.

Returns

\Kendo\UI\Gantt

Parameters

$value string|\Kendo\JavaScriptFunction

Example - using string which defines a JavaScript function

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->togglePlannedTasks('function(e) { }');
?>

Example - using string which defines a JavaScript name

<script>
    function onTogglePlannedTasks(e) {
        // handle the togglePlannedTasks event.
    }
</script>
<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->togglePlannedTasks('onTogglePlannedTasks');
?>

Example - using \Kendo\JavaScriptFunction

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->togglePlannedTasks(new \Kendo\JavaScriptFunction('function(e) { }'));
?>

addToolbarItem

Adds one or more GanttToolbarItem to the Gantt.

Returns

\Kendo\UI\Gantt

Parameters

$value[, $value2, ...] \Kendo\UI\GanttToolbarItem|array

Example - using \Kendo\UI\GanttToolbarItem

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$toolbarItem = new \Kendo\UI\GanttToolbarItem();
$name = 'value';
$toolbarItem->name($name);
$gantt->addToolbarItem($toolbarItem);
?>

Example - using array

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$name = 'value';
$gantt->addToolbarItem(array('name' => $name));
?>

Example - adding more than one GanttToolbarItem

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$first  = new \Kendo\UI\GanttToolbarItem();
$second = new \Kendo\UI\GanttToolbarItem();
$gantt->addToolbarItem($first, $second);
?>

tooltip

The task tooltip configuration options.

Returns

\Kendo\UI\Gantt

Parameters

$value \Kendo\UI\GanttTooltip|array

Example - using \Kendo\UI\GanttTooltip

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$tooltip = new \Kendo\UI\GanttTooltip();
$template = 'value';
$tooltip->template($template);
$gantt->tooltip($tooltip);
?>

Example - using array

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$template = 'value';
$gantt->tooltip(array('template' => $template));
?>

addView

Adds one or more GanttView to the Gantt.

Returns

\Kendo\UI\Gantt

Parameters

$value[, $value2, ...] \Kendo\UI\GanttView|array

Example - using \Kendo\UI\GanttView

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$view = new \Kendo\UI\GanttView();
$resizeTooltipFormat = 'value';
$view->resizeTooltipFormat($resizeTooltipFormat);
$gantt->addView($view);
?>

Example - using array

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$resizeTooltipFormat = 'value';
$gantt->addView(array('resizeTooltipFormat' => $resizeTooltipFormat));
?>

Example - adding more than one GanttView

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$first  = new \Kendo\UI\GanttView();
$second = new \Kendo\UI\GanttView();
$gantt->addView($first, $second);
?>

workDayEnd

Sets the end of the work day.

Returns

\Kendo\UI\Gantt

Parameters

$value date

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->workDayEnd(new date());
?>

workDayStart

Sets the start of the work day.

Returns

\Kendo\UI\Gantt

Parameters

$value date

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->workDayStart(new date());
?>

workWeekEnd

The end of working week (index based).

Returns

\Kendo\UI\Gantt

Parameters

$value float

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->workWeekEnd(1);
?>

workWeekStart

The start of working week (index based).

Returns

\Kendo\UI\Gantt

Parameters

$value float

Example

<?php
$gantt = new \Kendo\UI\Gantt('Gantt');
$gantt->workWeekStart(1);
?>
In this article
Not finding the help you need?