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

[Solved] Using and Binding a Grid to Ajax inside of a TabStrip using LoadFromContent

1 Answer 27 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.
Chris
Top achievements
Rank 1
Chris asked on 04 Oct 2010, 06:25 PM
Hello,

I'm trying to get a Grid to work inside of a TabStrip.
I have read all the forum posts I could find, the help docs, and the how to get partial views to work.
I even include every JS library in the master page to make sure they are all loaded.

None of them have fixed the issue.

I have two tabs, both load content using the LoadFromContent method. The second tab loads a partial view which has the call to 

<% Html.Telerik.Grid<T>() %>

I know the grid is set up and working perfectly, cause when I remove the TabStrip it works perfectly.

When the second TabLoads, the Grid does appear.
Then when you click on any of the sorting, filtering, editing, etc, it opens up in a new Window as if the JavaScript events aren't attached to the Grid.

Using Firebug to look at the request/response, I can see a block of javascript code coming back via the ajax call.
It's surrounded in the script tag and starts with:

jQuery('#GridName').tGrid(...);

If I cut and paste this code into the Firebug Console and Run it, the Grid functions absolutely perfectly.

If I include other scripts within the ajax response, they all run correctly. It is only the JS generated by the Grid that does not seem to get executed properly. 

Has anyone else had this issue? or better yet, know how to fix it?

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 05 Oct 2010, 07:53 AM
Hi Chris,

 I suggest you check the following:

  1. All JavaScript files required by the grid are registered in the view page which contains the tabstrip
  2. There is no JavaScript error after loading the tabstrip
  3. The grid is configured for ajax binding not for server binding

If this does not help you can attach an isolated sample application which shows the problems you are experiencing.

Greetings,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Chris
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or