Questions about creating new task.

2 posts, 0 answers
  1. Dmitry
    Dmitry avatar
    17 posts
    Member since:
    Oct 2014

    Posted 04 Mar 2015 Link to this post

    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)? 
  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 06 Mar 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
Back to Top