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

Grid within Tabstrip and "jQuery("#Grid").tGrid is not a function"

1 Answer 92 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.
Jeff
Top achievements
Rank 1
Jeff asked on 25 Jan 2012, 07:41 AM
I'm using 2011.3.1115 version. I have a TabStrip with two tabs. Both get loaded via ajax. First has no controls and loads fine. Second, when clicked tries to load a grid from a partial. But then I get "jQuery("#Grid").tGrid is not a function".

I know this is usually because the script for the grid was not loaded, but since I'm using the new version, scripts are automatically loaded but not tin this case. Firebug shows no script being loaded as well when clicking on the second tab that contains a grid.

My hierarchy is as follows. I have the main page which calls:
@{Html.RenderAction("_Account", "Brand" );}
Then, that action renders _Account whicg has a tabstrip that loads each tab from two actions:
.LoadContentFrom("_Stats", "Brand");
The second tab contains a grid which I hope would load the grid along with the script but it doesn't. I can see in the response of the 2nd clicked tab, it has all the grid info, just not loading the actual telerik grid script.

My layout does have the script registrar and all other pages load the telerik scripts automatically, just not in this case. I saw in this sample, all the scripts are manually registered. I simply have the scriptregistrar without adding individual scripts as in:
@(Html.Telerik().ScriptRegistrar().jQuery(false).jQueryValidation(false).DefaultGroup(group =>
    {
        group.UseTelerikContentDeliveryNetwork(true);          
    }))
The sample project however adds a bunch of js. I thought the scripts load automatically and they do for other pages.

Any ideas?

1 Answer, 1 is accepted

Sort by
0
Jeff
Top achievements
Rank 1
answered on 25 Jan 2012, 05:13 PM
Attached is a very simple project created by Telerik but slightly modified by me using latest version showing my exact problem.
Tags
Grid
Asked by
Jeff
Top achievements
Rank 1
Answers by
Jeff
Top achievements
Rank 1
Share this question
or