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

Embedded Kendo Widgets in Grid?

1 Answer 81 Views
Integration with other JS libraries
This is a migrated thread and some comments may be shown as answers.
Jonathan
Top achievements
Rank 1
Jonathan asked on 07 Dec 2015, 03:23 PM

I am evaluating Kendo UI for use with Angular.  I have spent many hours oin this issues, with no resolution so far.

I am creating a grid from a remote datasource and I want tformat the columns with embedded widgets (dropdown list & datepicker).

 I tried using rowTemplate and then column templates.  No matter what I do I get very strange behavior for the column entries.  This happens for both existing rows and rows I add with .addRow

 Here's the grid options:

01.var typeTemplate = '<select kendo-drop-down-list style="width: 100%;">'
02.                        +       '<option></option>'
03.                        +       '<option>BB</option>'
04.                        +       '<option>FVRCP</option>'
05.                        +   '</select>';
06. 
07.var dateTemplate = '<input kendo-date-picker style="width: 100%;" />';
08. 
09.this.options = {
10.        dataSource: dataSource,
11.        schema: {
12.            model: {
13.                id: 'vaccine_id',
14.                fields: {
15.                    vaccine_id: { type: 'number' },
16.                    type: { type: 'string'},
17.                    date: { type: 'date' }
18.                }
19.            }
20.        },
21.        columns: [
22.            { field: 'type', title: 'Type', template: typeTemplate },
23.            { field: 'date', title: 'Date', template: dateTemplate }
24.        ]
25.    };

Here's the symptoms:

- all values disappear when I call .addRow values disappear

- if I add a 2nd row, that row becomes highlighted (gold, I think) and stays highlighted.

 Any ideas?

 

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 09 Dec 2015, 12:38 PM

Hello Jonathan,

 

I'm not sure I understood your scenario completely from the provided information. Are you referring that when a record is set in edit mode, the widgets you have set for via the display template of the column are not shown? If this is the case you should use the column editor option to set the custom editors. How to do this when AngularJS is used is demonstrated in this how-to article.

 

Regarding you other issue, I'm not sure how to re-create this locally. Could you please provide a stripped down dojo, which to demonstrate the issue you are having. This will allow us to get better understanding about your scenario and provide you with more to-the-point answer.

 

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Integration with other JS libraries
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or