Hide/disable popup box gantt

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

    Posted 16 Nov Link to this post

    Guys are you able to help me to hide/disable just a popup box when double click on tasks? http://demos.telerik.com/php-ui/gantt/index
    I could add->editable(false); just below:

     

    [code]// gantt $gantt = new \Kendo\UI\Gantt('gantt'); $gantt->dataSource($tasks)->dependencies($dependencies)->height(650)->addView('', array('type' => 'week', 'selected' => false),'month')->addColumn($idColumn, $titleColumn, $startColumn, $endColumn)->showWorkHours(false)->showWorkDays(true)->snap(false)->editable(false);[/code]

     

    But then I cannot edit anything.
    Any clue? Thanks.

  2. Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    622 posts

    Posted 20 Nov Link to this post

    Hello Valerius,

    You could prevent the edit pop-up opening by handling the Gantt edit event in the following way:
    function onEdit(e) {
      if ($(e.container).hasClass('k-popup-edit-form')) {
        e.preventDefault();
      }
    }

    The above would prevent the editing only when a pop-up is about to be opened.

    Regards,
    Veselin Tsvetanov
    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 20 Nov in reply to Veselin Tsvetanov Link to this post

    Ok Veselin, and how to use above in php? Where I could paste this code?
    Other thing (the last I think :) Is there any possible to open some another modal window double clicking to tasks in gantt?
    For example if I could open something like this:

    http://demos.telerik.com/kendo-ui/window/index, instead of a default popup?

    Regards,.

  4. Valerius
    Valerius avatar
    14 posts
    Member since:
    Oct 2017

    Posted 20 Nov in reply to Veselin Tsvetanov Link to this post

    Guys, can you show how to hide this part of a modal popoup window in gantt?

    https://image.ibb.co/iGxEsm/images.jpg

    PHP

  5. Answer
    Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    622 posts

    Posted 22 Nov Link to this post

    Hello Valerius,

    Examples of attaching event handlers in PHP could be found on our Gantt events demo.

    Concerning your second question, yes, you could implement your own custom Edit template to be displayed in the pop-up. The Template should be declared in HTML using the Kendo MVVM binding, as shown in the following how-to. Note, that the above demonstrates the implementation for a Scheduler edit template. Nevertheless, the approach would be the same for the Gantt chart. GanttEditable.template should be defined and it should be passed to the editable configuration of the widget.

    As per the last question, you in order to hide required section of the pop-up you should apply the following CSS rule:
    div[data-container-for="end"] + div.k-edit-label,
    div[data-container-for="percentComplete"] {
      display: none;
    }

    Regards,
    Veselin Tsvetanov
    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.
  6. Valerius
    Valerius avatar
    14 posts
    Member since:
    Oct 2017

    Posted 23 Nov in reply to Veselin Tsvetanov Link to this post

    Thanks, works fine :)
Back to Top