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

[Solved] Not using ScriptRegistrar

6 Answers 256 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.
Erik
Top achievements
Rank 1
Erik asked on 04 Feb 2011, 04:23 PM
Hi!

I would like to use another "compression" framework for the telerik javascript files (http://combres.codeplex.com/). I can't find out how to make Html.Telerik().ScriptRegistrar only output the registration of (int this case) the grid component..

I would like to skip this in the output:
<script type="text/javascript" src="/MyApp/Content/Scripts/Telerik/2010.1.309/telerik.common.min.js"></script>
<script type="text/javascript" src="/MyApp/Content/Scripts/Telerik/2010.1.309/telerik.textbox.min.js"></script>
<script type="text/javascript" src="/MyApp/Content/Scripts/Telerik/2010.1.309/telerik.grid.min.js"></script>
<script type="text/javascript" src="/MyApp/Content/Scripts/Telerik/2010.1.309/telerik.grid.filtering.min.js"></script>

and just keep:
<script type="text/javascript">
//<![CDATA[
jQuery(document).ready(function(){
jQuery('#someGrid').tGrid({.......
//]]>
</script>

Is it possible?

6 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 07 Feb 2011, 08:25 AM
Hello Erik,

 Currently this is not supported out of the box. However you can easily implement it by modifying the source code. To do so open ScriptRegistrar.cs and find the Write(TextWriter writer) method. In that method remove the call of WriteScriptSources.

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
Erik
Top achievements
Rank 1
answered on 07 Feb 2011, 01:06 PM
Thanks!

It works great, I can now do:

Html.Telerik().ScriptRegistrar().ExcludeScriptSources()
0
Ulla-Britt
Top achievements
Rank 1
answered on 01 Jul 2011, 12:40 PM
This functionality is now implemented in the method "OutputScriptFiles(bool)" of the class ScriptRegistrar:

Html.Telerik().ScriptRegistrar().OutputScriptFiles(false)

0
Ed
Top achievements
Rank 1
answered on 16 Feb 2012, 08:06 PM
I too am using Combres and this feature is nice.

I am still not getting the grid to work correctly, no ajax at all, no sorting, filtering, etc.

Does anyone have a list of needed js files to register in Combres?

Thanks in advance.
0
Petur Subev
Telerik team
answered on 17 Feb 2012, 12:52 PM
Hi Erik,

Could you please provide additional information (code used) or a sample project so we can check what goes wrong on your side.

Kind Regards,
Petur Subev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Samuel
Top achievements
Rank 1
answered on 22 Jun 2012, 12:05 PM
Did get this working by including scripts needed from here:
http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-required-javascript-files.html

or include:
telerik.all.min.js - +500k file so beware

You then need to manually bind in your view/page:

<script>
    $(function () {
        $('#menu').tMenu();
    });
</script>
Tags
General Discussions
Asked by
Erik
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Erik
Top achievements
Rank 1
Ulla-Britt
Top achievements
Rank 1
Ed
Top achievements
Rank 1
Petur Subev
Telerik team
Samuel
Top achievements
Rank 1
Share this question
or