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

Add new Field in the popup

2 Answers 101 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Marcio
Top achievements
Rank 1
Marcio asked on 21 Oct 2019, 02:22 PM

Hi, 

I would like to add a new  field in the popup.

For example, there is the fields Title, Start, End, Complete, I'm trying to add a new field Project Number.

Can you suggest me some documentation about it?

2 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 23 Oct 2019, 06:35 AM

Hi Marcio,

In order to customize the edit popup of the Gantt, the editable.template option could be used as demonstrated in the following API reference:

I hope this helps.

Regards,
Dimitar
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Gabriel
Top achievements
Rank 1
Iron
commented on 18 Jan 2022, 09:45 AM

Do you know how can I do this in php?
Martin
Telerik team
commented on 20 Jan 2022, 08:18 AM

Here is a link to the PHP api reference of the configuration. Below you will find how the implementation should look like:

<?php
  $editable = new \Kendo\UI\GanttEditable();
  $editable->template('my-edit-template');
?>
 
<script id="my-edit-template" type="text/x-kendo-template">
   <h3>Edit meeting</h3>
   <p>
       <label>Title: <input name="title" /></label>
   </p>
   <p>
       <label>Start: <input data-role="datetimepicker" name="start" /></label>
   </p>
   <p>
       <label>End: <input data-role="datetimepicker" name="end" /></label>
   </p>
</script>

Important to note is that the template should contain elements whose name HTML attributes are set as the editable fields in order for the Gantt to know which field to update. The other option is to use MVVM bindings in order to bind HTML elements to data item fields.
Gabriel
Top achievements
Rank 1
Iron
commented on 20 Jan 2022, 11:10 AM

It seems that I'm not so good here, I don't know for which reason I get a pop-up window with a message inside "my-edit-template".

Martin
Telerik team
commented on 24 Jan 2022, 09:47 AM

I am not sure I understand the current issue you are having. Could you please elaborate a bit more what the problem is, so that I can help you further?
Gabriel
Top achievements
Rank 1
Iron
commented on 24 Jan 2022, 12:27 PM | edited

Output:

$editablex = new \Kendo\UI\GanttEditable();

$editablex->template('my-edit-template');

?>

<script id="my-edit-template" type="text/x-kendo-template">
   <h3>Edit meeting</h3>
   <p>
       <label>Title: <input name="title" /></label>
   </p>
   <p>
       <label>Start: <input data-role="datetimepicker" name="start" /></label>
   </p>
   <p>
       <label>End: <input data-role="datetimepicker" name="end" /></label>
   </p>
</script>

however, the following works:

$editablex = new \Kendo\UI\GanttEditable();

$editablex->template('<h3>Edit meeting</h3>
   <p>
       <label>Title: <input name="title" /></label>
   </p>
   <p>
       <label>Start: <input data-role="datetimepicker" name="start" /></label>
   </p>
   <p>
       <label>End: <input data-role="datetimepicker" name="end" /></label>
   </p>')
->create(true)
->update(true)
->confirmation(true);

?>

Martin
Telerik team
commented on 26 Jan 2022, 12:12 PM

Could you please try using templateId instead of template?

$editablex = new \Kendo\UI\GanttEditable();

$editablex->templateId('my-edit-template');

Gabriel
Top achievements
Rank 1
Iron
commented on 26 Jan 2022, 12:44 PM

Thank you very much. It works perfectly!
0
Mario
Top achievements
Rank 1
answered on 12 Nov 2019, 12:41 AM

Hey there! actually I have a Dojo that does what you need, take a look

Best Regards

Tags
Gantt
Asked by
Marcio
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Mario
Top achievements
Rank 1
Share this question
or