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
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
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,.
Guys, can you show how to hide this part of a modal popoup window in gantt?
https://image.ibb.co/iGxEsm/images.jpg
PHP
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
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