This is a migrated thread and some comments may be shown as answers.
Custom Template for Gantt Delete confirmation popup?
1 Answer 56 Views
This is a migrated thread and some comments may be shown as answers.
Anand
Top achievements
Rank 1
Anand asked on 25 Jan 2017, 08:46 AM

Hello

I am using gantt with angularjs.I want custom Confirmation modal while deleting Task,Based on your documentations i tried,,but i didnt work

 

<script id="editor" type="text/x-kendo-template"><br> Some Delete Message<br>  <button ng-click="customFunction()">Absolutely!</button><br></script>

AngularJs controller:-

gantt configuration object I am adding this field

messages: {

deleteTaskConfirmation:kendo.template($("#editor").html())

}

$scope.customFunction=function()

{console.log("Custom function triggered");

}

 

Firstly,Popup it is not displaying properly.please look into the attached screenshot

Secondly,how can i bind the custom  button functionality with controller. ($scope.customFunction())

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 27 Jan 2017, 07:43 AM
Hello Anand,

The messages configuration properties of the Kendo widgets would accept only text (string). The widget internally escapes any JavaScript (as in your case), or HTML passed to the property, which is the reason for the observed result.

Having in mind the above, the Gantt does not offer out-of-the-box the possibility to customize the confirmation dialog. What you could do in this case is to disable the default confirmation setting the editable.confirmation property to false, attach an event handler for the remove event, prevent the delete action in that event and pop-up your own custom confirmation window. After confirming the deletion, the Task should be manually deleted from the Gantt, using the removeTask method.

I hope, that the above answers your question. In case you have any other questions, please do not hesitate to contact us.

Regards,
Veselin Tsvetanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Gantt
Asked by
Anand
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or