RadNumericTextBoxes generate thousands LOC (Js)

2 posts, 1 answers
  1. Markus Greuel
    Markus Greuel avatar
    1 posts
    Member since:
    Mar 2010

    Posted 29 Mar 2010 Link to this post

    HI,

    I have a table which may contain hundreds of NumericTextBoxes. This results in thousands line of Javascript repeating

    Sys.Application.add_init(function() {
        $create(Telerik.Web.UI.RadNumericTextBox, {"_enableOldBoxModel":false,"_focused":false,"_originalValue":45,"_postBackEventReferenceScript":"setTimeout(\"__doPostBack(\\\u0027ctl00$m$g_c2c9bd70_6add_41ce_811f_7a6842bf9330$ctl10$6cd603ba-6163-4442-b414-0171c5db5942_upper_12$inputBox\\\u0027,\\\u0027\\\u0027)\", 0)","_shouldResetWidthInPixels":true,"clientStateFieldID":"ctl00_m_g_c2c9bd70_6add_41ce_811f_7a6842bf9330_ctl10_6cd603ba-6163-4442-b414-0171c5db5942_upper_12_inputBox_ClientState","enabled":true,"incrementSettings":{InterceptArrowKeys:true,InterceptMouseWheel:true,Step:1},"numberFormat":{"DecimalDigits":0,"DecimalSeparator":".","CultureNativeDecimalSeparator":".","GroupSeparator":",","GroupSizes":3,"NegativePattern":"-n","NegativeSign":"-","PositivePattern":"n","AllowRounding":true,"KeepNotRoundedValue":false,"KeepTrailingZerosOnFocus":false},"styles":{HoveredStyle: ["width:32px;", "riTextBox riHover eingabe number"],InvalidStyle: ["width:32px;", "riTextBox riError eingabe number"],DisabledStyle: ["width:32px;", "riTextBox riDisabled eingabe number"],FocusedStyle: ["width:32px;", "riTextBox riFocused eingabe number"],EmptyMessageStyle: ["width:32px;", "riTextBox riEmpty eingabe number"],ReadOnlyStyle: ["width:32px;", "riTextBox riRead eingabe number"],EnabledStyle: ["width:32px;", "riTextBox riEnabled eingabe number"],NegativeStyle: ["width:32px;", "riTextBox riNegative eingabe number"]}}, null, null, $get("ctl00_m_g_c2c9bd70_6add_41ce_811f_7a6842bf9330_ctl10_6cd603ba-6163-4442-b414-0171c5db5942_upper_12_inputBox"));
    });
    

    As the application targets IE6 this is extremly slow, causing a non responding IE.

    Isn't there a possibility to speed things up / reduce the js code?
  2. Answer
    Dimo
    Admin
    Dimo avatar
    8485 posts

    Posted 29 Mar 2010 Link to this post

    Hello Markus,

    Yes,  use RadInputManager instead.

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

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

    Kind regards,
    Dimo
    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.
Back to Top