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

Hide/disable popup box gantt

6 Answers 262 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Valerius
Top achievements
Rank 1
Valerius asked on 16 Nov 2017, 10:08 AM

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.

6 Answers, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 20 Nov 2017, 07:36 AM
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.
0
Valerius
Top achievements
Rank 1
answered on 20 Nov 2017, 07:50 AM

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,.

0
Valerius
Top achievements
Rank 1
answered on 20 Nov 2017, 07:15 PM

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

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

PHP

0
Accepted
Veselin Tsvetanov
Telerik team
answered on 22 Nov 2017, 08:01 AM
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.
0
Valerius
Top achievements
Rank 1
answered on 23 Nov 2017, 08:20 AM
Thanks, works fine :)
0
Ben
Top achievements
Rank 1
answered on 04 Nov 2019, 09:03 PM

I have a custom "window" to make edits to the Gantt control as opposed to using the base or a modified template. I was getting a double popup (the template and my popup window) until I found this post. Now I'm able to suppress the standard template when firing the Edit event and only my custom window displays. This is exactly what I needed.

 

Thanks Veselin!

Ben

Tags
Gantt
Asked by
Valerius
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Valerius
Top achievements
Rank 1
Ben
Top achievements
Rank 1
Share this question
or