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

Angular directive elements in Kendo Row Templates

1 Answer 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
June
Top achievements
Rank 1
June asked on 12 Aug 2016, 12:51 AM

Hi guys,

I'm currently using Angular 1.5.x with Kendo UI Professional, the latest release (version 2016.2.504).  

I have a kendo grid which uses row templates.  In these row templates, I have a number of angular directive elements that is basically a wrapper around the Kendo combo box and a button.  The kendo combo box is bound to a remote data source using the kendo.data.DataSource object.  Whenever I attempt to add a new Row or remove an existing row from the Kendo grid, I think Kendo redraws everything in the grid and all of my angular elements get recreated so that each angular element with the remote data source goes through a DataBound event and calls the remote source again.  This is highly inefficient is something that I want to avoid overall.  I know that if I just use a plain old kendo combo box instead of my angular wrapper element, this doesn't happen, but that's not what I want.  Can anyone help me with this?  Is there some way I can stop the angular element from being recreated whenever I want to add a new row or remove an existing row from the Kendo grid?

 

Thanks in advance for the help!  

1 Answer, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 16 Aug 2016, 08:27 AM
Hi June,

Please note that you cannot avoid re-rendering of the rows when new row is added and therefor you should use different solution. For example you can make the comboboxes use single dataSource instance or load all items on the client side and filter them for each combobox individually. Such example could be:

Regards,
Vladimir Iliev
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
June
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Share this question
or