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

noDataTemplate

3 Answers 88 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
Danny
Top achievements
Rank 1
Danny asked on 04 Apr 2017, 07:54 AM

Hi folks,

I try to use the noDataTemplate as mentioned in example on "http://demos.telerik.com/kendo-ui/autocomplete/addnewitem" for adding new items if they not exist in data source. The data source in my case is a local one, NOT using remote data. My application is running with angular and I use the autocomplete inside an angular controller, NOT as angular directive. Inside the loaded template I try to use a scope function of my angular controller, to trigger the new item adding.

Now at run time, the template is inserted into the DOM at the end of the body not inside my controller area, where the autocomplete is located.

 

Now the problem is, that the scope function is not found in template. Is there any other approach or what is my mistake by initializing the autocomplete control?

 

Thx and 

kind regards

Danny

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 05 Apr 2017, 12:10 PM
Hello Danny,

We managed to make a working sample by following your guidelines. You can find the example here.

Please change this Dojo so it reproduces the problem you are experiencing and send it back to us. This way we will be able to troubleshoot the issue locally and to to provide you with the most appropriate assistance for your case.

Looking forward to hearing from you.

Regards,
Dimitar
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.
0
Danny
Top achievements
Rank 1
answered on 06 Apr 2017, 04:11 AM

Hello Dimitar,

 

thx for your reply. As I figures out, the difference ist, that I initialize the kendoAutoComplete inside the angular Javascript code. As you can see here.

So the preferred way of working with angular is to use the kendo.directives? Or is there a possibility to work completely in code behind for this matter?

Kind regards

Danny

0
Dimitar
Telerik team
answered on 06 Apr 2017, 10:38 AM
Hello Danny,

The recommended approach is to follow the Kendo UI official documentation for AngularJs, which states that you should use Kendo UI directives to seamelessly integrate Kendo UI and AngularJS frameworks.

You can also check the Common Issues section for more detailed information about widget initialization issues, that you might encounter while handling Kendo UI widgets in AngularJS.

Regards,
Dimitar
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
AutoComplete
Asked by
Danny
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Danny
Top achievements
Rank 1
Share this question
or