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

[Solved] Grid Edit Template DropDownList w/ Angular

1 Answer 223 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robin
Top achievements
Rank 1
Robin asked on 13 Oct 2014, 10:09 PM
Hi all,

I'm having some trouble getting my edit templates to work properly in a grid. I'm using 2014.2.716, testing on Chrome 38.

The DropDownList is getting the list of options just fine, but it endlessly displays the spinner on the right side, and throws this error:

TypeError: Cannot read property '$$phase' of null
    at d (http://localhost:62090/Administration/Scripts/kendo/2014.2.716/kendo.angular.min.js:9:1422)
    at Object.<anonymous> (http://localhost:62090/Administration/Scripts/kendo/2014.2.716/kendo.angular.min.js:9:6625)
    at n.(anonymous function) [as angular] (http://localhost:62090/Administration/Scripts/kendo/2014.2.716/kendo.angular.min.js:9:1867)
    at Q.extend._angularItems (http://localhost:62090/Scripts/kendo/2014.2.716/kendo.web.min.js:9:31027)
    at o.extend.refresh (http://localhost:62090/Scripts/kendo/2014.2.716/kendo.web.min.js:17:11938)
    at x.isFunction.i (http://localhost:62090/Scripts/jquery-1.10.2.min.js:21:6426)
    at n.extend.trigger (http://localhost:62090/Scripts/kendo/2014.2.716/kendo.web.min.js:9:6337)
    at ct.extend._process (http://localhost:62090/Scripts/kendo/2014.2.716/kendo.web.min.js:11:20871)
    at ct.extend.success (http://localhost:62090/Scripts/kendo/2014.2.716/kendo.web.min.js:11:17904)
    at Object.x.isFunction.i [as success] (http://localhost:62090/Scripts/jquery-1.10.2.min.js:21:6426)


Inside a "text/x-kendo-template" script block bound as the edit template for a grid, I have this:

<div class="k-edit-label">
    <label for="StateId">State</label>
</div>
<div class="k-edit-field" data-container-for="StateId">
    <input id="StateId" name="StateId"
           kendo-drop-down-list
           k-data-source='states'
           k-data-text-field="'Name'"
           k-data-value-field="'Id'" />
</div>

states is a simple array of { Id: #, Name: "" } on $scope, and the StateID field in my grid is what needs to change. I tried putting k-data-bind="value:StateId" there too, but got an unexpected token error for the ':'. 

The documentation on Angular Kendo is pretty sparse, so I'm not sure how to proceed on this. You guys should provide Angular examples alongside the ASP.NET and regular JS examples for each given demo, IMO.

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 15 Oct 2014, 03:46 PM
Hello Robin,

Before we proceed further could you please try to upgrade to the latest official release (v.2014.2.1008) and see if the issue still persists?
If not I would like to ask you to isolate the problem in a separate Kendo Dojo test page so we can examine what is going wrong and provide you with a concrete recommendations.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Robin
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or