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

Sripts size

1 Answer 49 Views
Input
This is a migrated thread and some comments may be shown as answers.
fernandes fernandes
Top achievements
Rank 1
fernandes fernandes asked on 12 Jan 2015, 04:16 PM
Hi everyone!

I've been using Telerik controls for almost ten years and I'm having some difficulties regarding the size of the result HTML/JS file size.

Current scenario: We have almost 150 table rows and each row contains multiple RadNumericTextBox. Currently, for each RadNumericTextBox an enourmous scripting is being produced (see below).

I remember that a solution was found for this same problem but for "RadCalendar" (where we could use a technique called "Shared Calendars").

Can we use something like that in this situattion? What can we do in order to reduce the enourmous content that is being generated on our html page?

Thanks in advance!



Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadNumericTextBox, {"_displayText":"1,00","_focused":false,"_initialValueAsText":"1","_postBackEventReferenceScript":"setTimeout(\"__doPostBack(\\\u0027ctl00$cphMain$numTextBoxNumDays_2798\\\u0027,\\\u0027\\\u0027)\", 0)","_skin":"Default","_validationText":"1","clientStateFieldID":"numTextBoxNumDays_2798_ClientState","enabled":true,"incrementSettings":{InterceptArrowKeys:true,InterceptMouseWheel:true,Step:1},"minValue":0,"numberFormat":{"DecimalDigits":2,"DecimalSeparator":",","CultureNativeDecimalSeparator":",","GroupSeparator":".","GroupSizes":3,"NegativePattern":"-n","NegativeSign":"-","PositivePattern":"n","AllowRounding":true,"KeepNotRoundedValue":false,"KeepTrailingZerosOnFocus":false,"NumericPlaceHolder":"n"},"showSpinButtons":true,"styles":{HoveredStyle: ["width:60px;text-align:right;", "riTextBox riHover"],InvalidStyle: ["width:60px;text-align:right;", "riTextBox riError"],DisabledStyle: ["width:60px;text-align:right;", "riTextBox riDisabled"],FocusedStyle: ["width:60px;text-align:right;", "riTextBox riFocused"],EmptyMessageStyle: ["width:60px;text-align:right;", "riTextBox riEmpty"],ReadOnlyStyle: ["width:60px;text-align:right;", "riTextBox riRead"],EnabledStyle: ["width:60px;text-align:right;", "riTextBox riEnabled"],NegativeStyle: ["width:60px;text-align:right;", "riTextBox riNegative"]}}, {"valueChanging":OnValueChangingNumDays}, null, $get("numTextBoxNumDays_2798"));
});

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 15 Jan 2015, 11:53 AM
Hi,

In your case you should use RadInputManager instead of RadNumericTextBox. See the resources below:

http://demos.telerik.com/aspnet-ajax/input/examples/radinputmanager/dynamicinputfiltersettings/defaultcs.aspx?product=input

http://demos.telerik.com/aspnet-ajax/input/examples/radinputmanager/databinding/defaultcs.aspx

http://www.telerik.com/help/aspnet-ajax/introduction_to_radinputmanager.html

I hope this helps.

Regards,
Maria Ilieva
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Input
Asked by
fernandes fernandes
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or