Hide separate tasks

3 posts, 0 answers
  1. Valerius
    Valerius avatar
    14 posts
    Member since:
    Oct 2017

    Posted 29 Oct 2017 Link to this post

    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. Dimitar
    Admin
    Dimitar avatar
    377 posts

    Posted 31 Oct 2017 Link to this post

    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.
  3. Valerius
    Valerius avatar
    14 posts
    Member since:
    Oct 2017

    Posted 01 Nov 2017 in reply to Dimitar Link to this post

    Many thanks Dimitar it's works good :)
Back to Top