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

RadInput Q1 2012 is ignoring stylesheet

3 Answers 120 Views
Input
This is a migrated thread and some comments may be shown as answers.
Paul Evers
Top achievements
Rank 2
Paul Evers asked on 27 Feb 2012, 09:40 AM
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

 

3 Answers, 1 is accepted

Sort by
0
Accepted
Galin
Telerik team
answered on 01 Mar 2012, 12:51 PM
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.
0
Andrea Del Brocco
Top achievements
Rank 1
answered on 22 Mar 2012, 09:09 AM
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

0
Galin
Telerik team
answered on 23 Mar 2012, 03:30 PM
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.
Tags
Input
Asked by
Paul Evers
Top achievements
Rank 2
Answers by
Galin
Telerik team
Andrea Del Brocco
Top achievements
Rank 1
Share this question
or