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

[Solved] Trying to access $("#grid").data("kendoGrid").dataSource from outside

1 Answer 878 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CS
Top achievements
Rank 2
CS asked on 17 Sep 2014, 10:41 AM
I have the following scenario:

I have a kendo ui grid in an iframe in an iframe and I'm trying to access it from the parent. I get to the grid alright but .data("kendoGrid") is undefined there. Do I have to do something special to access the grid data or datasource from outside the actual iframe and what?

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 17 Sep 2014, 11:34 AM
Hello Stefan,

You will need to get a reference of the iframe and its contents, then access the grid inside. Here is a useful topic that shows how to search for content inside an iframe using jQuery:

http://stackoverflow.com/questions/364952/jquery-javascript-accessing-contents-of-an-iframe

If this does not help please provide us with a runnable sample to see your exact scenario, so we can further assist you.

Regards,
Kiril Nikolov
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
CS
Top achievements
Rank 2
Answers by
Kiril Nikolov
Telerik team
Share this question
or