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

[Solved] Grid in Tabstrip - PopUp editor throws javascript error

2 Answers 79 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brian Roth
Top achievements
Rank 1
Brian Roth asked on 02 Sep 2010, 04:27 PM
I have a tabstrip on a page which is used to navigate between a few different grids.  The grids exist on separate user controls and are loaded using the LoadContentFrom method.  The grids are set to use the PopUp editor.  When I try to launch the editor or insert a new record I get a javascript error.  For editing I get "Microsoft JScript runtime error: 'length' is null or not an object" which seems to be coming from the jQuery-1.4.2 file being called from the draganddrop.applycontext method.  For inserting the error comes in the telerik.editing.js code in the popup function.  The line var wnd = result.data('tWindow'); does not get an object so the subsequent line throws an "'undefined' is null or not an object" error.

Here is what my ScriptRegistrar looks like on my master page:
<% Html.Telerik().ScriptRegistrar()
       .DefaultGroup(group => group
            .Add("jquery.validate.js")
            .Add("telerik.common.js")
            .Add("telerik.grid.js")
            .Add("telerik.grid.filtering.js")
            .Add("telerik.grid.editing.js")
            .Add("telerik.grid.grouping.js")
            .Add("telerik.grid.resizing.js")
           .Add("telerik.calendar.js")
           .Add("telerik.datepicker.js")
           .Add("telerik.window.js")
           .Add("telerik.draganddrop.js")
           .Add("telerik.textbox.js")
           .Combined(true)
           .CacheDurationInDays(365)
           .Compress(true)
           ).Render(); %>

I think I'm including all the scripts that I should need for the editor to work, but maybe someone will notice something that I'm missing.  I tested the scenario with the content embedded on the tab in the main page using the .Content method instead of being loaded from user controls and that works without errors.  I also did testing with the grid in InLine and InForm edit modes with the content loaded from user controls and those worked just fine.

Thanks for your help with this.

Regards,
Brian

2 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 02 Sep 2010, 04:30 PM
Hi Brian Roth,

Try including the draganddrop script before the window as the latter depends on it.

Kind regards,
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
0
Brian Roth
Top achievements
Rank 1
answered on 02 Sep 2010, 04:56 PM
Hi Atanas,

Thanks so much for the speedy reply!  That fixed the issue.
Tags
TabStrip
Asked by
Brian Roth
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Brian Roth
Top achievements
Rank 1
Share this question
or