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

[Solved] Grid client events

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert
Top achievements
Rank 1
Robert asked on 18 Feb 2013, 11:29 AM
Hello

I have some problems with the Grid client events. I thought it was easier to create a small demo project instead of trying to describe it all.

I have a page with a splitter. In the left pane, i use the panelbar as menu and in the right pane, i display the page content.
I often use the grid to display data in the content area (loaded with ajax) when the first grid is loaded, there is no problem. As soon as i load another page, the new grid gets an error saying that it can't find the client event scripts.

to reproduce the error, just run the project, open the panelbar and then click Test and then Test1 either way. When i test it with the Internet Explorer, i get an error message. Firefox doesn't return errors, but also doesn't execute the script.

Thank you for your help!
Robert

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 21 Feb 2013, 09:03 AM
Hello Robert,

The events should be defined before the Grid when loading the content dynamically. Check the attached modified project. The reason that the Grid will work as expected the first time is that the needed scripts will not be loaded so it will make an asynchronous request before initializing. When the scripts are already loaded the initialization script will be immediately executed so the function will not be defined yet. 

Regards,
Daniel
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or