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

[Solved] Questions about using ScriptRegistrar with Telerik MVC Controls

2 Answers 167 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Armen
Top achievements
Rank 1
Armen asked on 09 Jun 2011, 12:27 AM
Hello,

I have some concerns about using the script registrar.

1) Would I be correct in assuming that all or most of the MVC controls end up communicating with the script registrar behind the scenes? For example, when I render a Telerik Menu, it actually inserts an OnDocumentReady call to jQuery.fn.tMenu()?

Is there any way to have the control render its jQuery call to a <script/> element instead, rather that going through the script registrar?
Is there a way to use the Telerik MVC controls without needing to use the script registrar?

2) Also, if I use the script registrar, I notice that I can no longer place a $(document.ready()) call in my own <script/> elements. They do not fire. The only way to have it execute is registering with the script registrar - but I don't want my components to be coupled to the script registrar. Is there any way to use both <script>$(document.ready(....</script> as well as continuing to use the script registrar? Or is it one or the other?

Much thanks, let me know if you need any clarifications.

2 Answers, 1 is accepted

Sort by
0
Sydney
Top achievements
Rank 1
answered on 14 Jul 2011, 08:26 PM
Would love to hear the answer to this - I am about to rip out all my Telerik controls as I don't like the behavior of the ScriptRegistrar  and it seems like the controls don't work unless I pollute my whole solution with the Registrar.  Is it possible to use a Telerik MVC control without using the Script Registrar, so long as I provide the requisite script references?
0
Alex Gyoshev
Telerik team
answered on 15 Jul 2011, 06:20 AM
Hi Sydney, Armen,

The use of the registrar is optional. It just renders the appropriate scripts for the components you are using, and allows you to compress and combine them. If you want to do this manually, you can do so. Here is a list of all required JavaScript files for each component.

Best wishes,
Alex Gyoshev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
General Discussions
Asked by
Armen
Top achievements
Rank 1
Answers by
Sydney
Top achievements
Rank 1
Alex Gyoshev
Telerik team
Share this question
or