This is a migrated thread and some comments may be shown as answers.

Hide separate tasks

2 Answers 110 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Valerius
Top achievements
Rank 1
Valerius asked on 29 Oct 2017, 06:14 PM
I'm using a Gantt with remote data source and php wrappers. In the remote data source I'm using php DataSourceResult as also shown in the Kendo UI Demos.
Is there any possible to hide some separate tasks in gantt?. I would like to hide the tasks which have for example field project = 12 on the server side.
Thanks

2 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 31 Oct 2017, 11:52 AM
Hello Valerius,

The DataSourceTransportRead data() method can be used to pass additional parameters with the read request to the server. There, the field value can be passed to the server side (project = 12) and then the query to the database for retrieving the needed data can be performed based on this parameter. This way, the desired tasks will not be sent to the client side, thus they will not be visible:
<?php
$read = new \Kendo\Data\DataSourceTransportRead();
$read->data(new \Kendo\JavaScriptFunction('function() {
    return { project: 12 }
}'));
?>

Also, you can refer to the Gantt Remote Binding Documentation for a complete example on how to configure the widget to request data from a remote end-point.

Regards,
Dimitar
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Valerius
Top achievements
Rank 1
answered on 01 Nov 2017, 05:55 PM
Many thanks Dimitar it's works good :)
Tags
Gantt
Asked by
Valerius
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Valerius
Top achievements
Rank 1
Share this question
or