avoiding ScriptRegistrar with Telerik components -


i have mvc site uses telerik grid control.

when use scriptregistrar include desired .js files, works fine , files includes are:

telerik.common.min.js telerik.textbox.min.js telerik.calendar.min.js telerik.datepicker.min.js telerik.grid.min.js telerik.grid.filtering.min.js 

however, if include these same files using

<script type="text/javascript" src="/scripts/telerik.common.min.js"></script> ....*all others*.... 

and totally take out scriptregistrar (i want because want use mvc4 bundling support instead) grid not load correctly.

the reason of problem scriptregisterar add jquery scripts page startup action. think have 2 work-arounds :

1st:

you can add "telerik.common.min.js" file through scriptregisterar , add other telerik script files through mvc 4 bundling component. if so, telerik tries load related script files @ run time. example if have combobox in page, telerik add scripts load script after page load. ignores loading if loaded previously.

or

2nd:

you can find , analyze injected startup script file. checked , can (but further investemnt needed)

<script type="text/javascript"> //<![cdata[ jquery(document).ready(function(){ if(!jquery.telerik) jquery.telerik = {}; jquery.telerik.cultureinfo={"shortdate":"yyyy/mm/dd","longdate":"yyyy/mm/dd","longtime":"hh:mm:ss tt","shorttime":"hh:mm tt","fulldatetime":"yyyy/mm/dd hh:mm:ss tt","sortabledatetime":"yyyy\u0027-\u0027mm\u0027-\u0027dd\u0027t\u0027hh\u0027:\u0027mm\u0027:\u0027ss","universalsortabledatetime":"yyyy\u0027-\u0027mm\u0027-\u0027dd hh\u0027:\u0027mm\u0027:\u0027ss\u0027z\u0027","generaldateshorttime":"yyyy/mm/dd hh:mm tt","generaldatetime":"yyyy/mm/dd hh:mm:ss tt","monthday":"mmmm dd","monthyear":"mmmm, yyyy","days":["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],"abbrdays":["sun","mon","tue","wed","thu","fri","sat"],"shortestdays":["su","mo","tu","we","th","fr","sa"],"abbrmonths":["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec",""],"months":["january","february","march","april","may","june","july","august","september","october","november","december",""],"am":"ق.ظ","pm":"ب.ظ","dateseparator":"/","timeseparator":":","firstdayofweek":0,"currencydecimaldigits":2,"currencydecimalseparator":"/","currencygroupseparator":",","currencygroupsize":3,"currencynegative":3,"currencypositive":2,"currencysymbol":"ريال","numericdecimaldigits":2,"numericdecimalseparator":".","numericgroupseparator":",","numericgroupsize":3,"numericnegative":3,"percentdecimaldigits":2,"percentdecimalseparator":".","percentgroupseparator":",","percentgroupsize":3,"percentnegative":0,"percentpositive":0,"percentsymbol":"%"}; //]]> </script> 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -