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

Add javascript function to ComboboX template

1 Answer 46 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Bhautik
Top achievements
Rank 1
Bhautik asked on 07 Apr 2019, 08:10 AM

Hello,

Is there any way to add javascript function in tempplate.I have made one example but it didn't work.

https://dojo.telerik.com/ATEWEmuz/82

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 09 Apr 2019, 02:10 PM
Hello Bhautik,

Thank you for the provided example. It looks to me that it is working correctly. Please take a look at this Dojo example to see the minor changes I made. When you call the test() in the Template() function, I changed it to take data.id as an argument. That will return the correct id values in the dropdown. Also, in the else statement, "Name" needs to be in lower case, otherwise it will throw a Reference Error. If the issue still persists, please modify the Dojo example so that the problem would become visible. Keep in mind that the behavior might be caused by the browser you are using.

Do not hesitate to contact us if you have further questions.

Regards,
Martin
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.
Tags
ComboBox
Asked by
Bhautik
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or