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

Questions about creating new task.

1 Answer 143 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Dmitry
Top achievements
Rank 1
Iron
Dmitry asked on 04 Mar 2015, 09:34 AM
Hello,
I have several questions regarding adding new task.

1) When I double click task html "window" (pop up) is displayed for editing task title, start/end dates and percent complete fields of the task.
I want to display this "window" when I click "+ Add task" button. How can I do this? My goal is to force user to create new task via filled form instead of adding task automatically with "New task" title.

2) How can I handle clicking "Save" button of the "window"? When user fills the form from question 1 I have to run some script to create new task.  

3) I want to customize the "window". How to add one additional drop down list (html tag "select") with predefined options?

4) How to hide "Delete" and "Save" (leave only "Cancel") buttons on the "window" for some tasks (not for all, condition for hiding is determined using task custom properties)? 

1 Answer, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 06 Mar 2015, 08:26 AM
Hello,

Here are the answers to your questions:

1) By default the gantt widget does not support this functionality, but it could be achieved with custom code. Here is a dojo snippet showing how to achieve such behavior. Please note that first the task is inserted with default values and then the edit form is opened so the user could define the task fields.

2) You could subscribe to the edit event which provides reference to the form container element and to attached an event handler to the "Save" button's click. This is also demonstrated in the above provided dojo snippet.

3) In order to customize the edit form a template could be used. 

4) You could use the same approach as the one used to attach an event handler to the save button. The edit event offers a reference to the task being edited.

Regards,
Dimitar Terziev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Gantt
Asked by
Dmitry
Top achievements
Rank 1
Iron
Answers by
Dimitar Terziev
Telerik team
Share this question
or