Sripts size

2 posts, 0 answers
  1. fernandes fernandes
    fernandes fernandes avatar
    4 posts
    Member since:
    Mar 2005

    Posted 12 Jan 2015 Link to this post

    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"));
    });
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 15 Jan 2015 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top