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

Getting Kendo Grid Id in angular js controller

1 Answer 539 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Prakash
Top achievements
Rank 1
Prakash asked on 19 Oct 2015, 04:13 AM

Hi,

I am using kendo grid with angular ​environment. One of the issue I am facing here is that I need to get the kendo grid id in the angular controller and then replace the header title with some value.

Here is the code I am using in controller

$("#​Test.kendoGrid th[data-field=DateSubmitted]").html("TestFrequency");​     ​//Tried using jquery

<div kendo-grid="​Test.kendoGrid" k-options="​Test.kendoGridOptions" k-ng-delay="​Test.kendoGridOptions"></div>

As in above, the kendo grid has field 'DateSubmitted' and the title initially while page load is 'Submission Date'. Now on some event, I need to change the title.

But the title is never replaced. Its seems the kendo gird id is not found using jquery.

Let me know if there is any way to accomplish this.

Thanks.

 

 

1 Answer, 1 is accepted

Sort by
0
Plamen Lazarov
Telerik team
answered on 20 Oct 2015, 03:58 PM

Hello Prakash,

Probably the jQuery approach is not working because wrong selectors are used. Here is a basic example which demonstrates a possible approach: 

http://dojo.telerik.com/azUpi/2

However, in case you want to obtain a reference to the Grid, please see the following documentation page: 

http://docs.telerik.com/kendo-ui/AngularJS/introduction#get-widget-references

I hope this helps.

Regards,
Plamen Lazarov
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
Prakash
Top achievements
Rank 1
Answers by
Plamen Lazarov
Telerik team
Share this question
or