RadInput Q1 2012 is ignoring stylesheet

4 posts, 1 answers
  1. Paul Evers
    Paul Evers avatar
    52 posts
    Member since:
    Oct 2011

    Posted 27 Feb 2012 Link to this post

    Hi,

    I am using RadTextBox with a width specified in a stylesheet.
    .InputField
    {
        width: 85px !important;
    }

    With the previous release this was working great.

    With the new release (Q1 2012) the style sheet is not working.

    In the attached picture you see that in the version Q1 2012 an inline style is attached to the generated span for the RadTextBox. In version Q3 2011 this was not present. This is why the width in the css-file is ignored.

    Is this a bug in Q1 2012?

    Paul

     

  2. Answer
    Galin
    Admin
    Galin avatar
    526 posts

    Posted 01 Mar 2012 Link to this post

    Hello Paul,

    Since Q3 2011 RadInput has a new rendering mode. This mode is controlled through the EnableSingleInputRendering property. Since Q1 2012 it is set to true by default and the RadInput controls use a single input of type text to keep the entered values. Whereas with the non-single input rendering mode, two or three inputs of type text are rendered.

    Enabling the single input rendering mode improves the page performance and allows for easier customizations.

    However, with the new rendering you should control the with of the property, e.g. Width="85", or with the following CSS
    .riSingle
    {
       width: 85px !important;
    }

    I hope his helps.

    Kind regards,
    Galin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Andrea Del Brocco
    Andrea Del Brocco avatar
    11 posts
    Member since:
    Jan 2003

    Posted 22 Mar 2012 Link to this post

    I use
    <div class="field width200">
                        <label runat="server" id="lblCognome" class="labsopra" for="txtCognome">
                            Cognome</label>
                        <telerik:RadTextBox ID="txtCognome" runat="server" CssClass="width190" MaxLength="50" />
                    </div>

    with

    .width190
    {
    	width:190px !important;
    }
     
    .width200
    {
    	width:200px !important;
    }


    In previous release or without EnableSingleInputRendering the width is correctly rendered, changing with Q12012
    all my forms (about 100 with several input forms all made with the same behaviour of the sample) loose the correct width.

    How can set the same old behaviour with new release?

    Today i'm not be able to upgrade my solution (i have to set manually then EnableSingleInputRendering =false in all my inputs)

    Thanks
    Andrea

  5. Galin
    Admin
    Galin avatar
    526 posts

    Posted 23 Mar 2012 Link to this post

    Hi Andrea,

    You can achieve this by setting the CSS class to the property WrapperCssClass.

    Also, there is a way to disable the property SingleInputRendering globally by using ControlAdapter, see the attached WebSite for working example.

    I hope this helps.

    Greetings,
    Galin
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top