All RadTextBoxes same size

8 posts, 0 answers
  1. Susan
    Susan avatar
    137 posts
    Member since:
    Jul 2007

    Posted 26 Nov 2012 Link to this post

    The 'Columns' property on all my RadInputBox's are no longer working. I have just upgraded to the latest version. I have a huge application and cannot override per page. All the text boxes on the page are now the same size. What do I need to do in order to have the 'columns' property working again.

    Thanks,
    Susan
  2. Milena
    Admin
    Milena avatar
    224 posts

    Posted 29 Nov 2012 Link to this post

    Hello,

    Since Q3 2012 we changed the default behavior of RadInput control. You can control its width as use "width" property of the control. The width could be controlled also by Columns property, but it is necessary to set width to auto with css rule as it is shown below:
    .customStyle
          {
              width: auto !important;
          }


    Regards,
    Milena
    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. Susan
    Susan avatar
    137 posts
    Member since:
    Jul 2007

    Posted 29 Nov 2012 Link to this post

    So do I have to apply this style to every textbox in my application OR change every textbox in my application to use width instead of columns, or is there a way to apply this globally. My application is huge and this would take a long time to accomplish if I have to make a change to every textbox.

    Thanks,
    Susan
  5. Milena
    Admin
    Milena avatar
    224 posts

    Posted 04 Dec 2012 Link to this post

    Hello,

    You can use the following css rule, which will override the width of all textboxes on the page:

    <style type="text/css">
         html body .riSingle .riTextBox, html body .riSingle .riTextBox[type="text"]
        {
            width: auto !important;
        }
    </style>


    Greetings,
    Milena
    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.
  6. Susan
    Susan avatar
    137 posts
    Member since:
    Jul 2007

    Posted 04 Dec 2012 Link to this post

    When I do that, my 'required' (from the required field validator) shows up in the middle of the textbox. It is no longer right after the textbox itself. I have attached an image.

    <tr>

     <td class="NormalPadding" width="15%">Donation Purpose<font color="red">*</font></td>

     <td>

     <telerik:RadTextBox ID="DonationPurpose" Skin="Web20" MaxLength="50" Columns="30" runat="server" TabIndex="1" ToolTip="A short description of the donation purpose"/>&nbsp;

     <asp:requiredfieldvalidator ID="rfvDonationPurpose" cssclass="Normal" controltovalidate="DonationPurpose" errormessage="Required." display="dynamic" runat="server" /></td></tr>

  7. Milena
    Admin
    Milena avatar
    224 posts

    Posted 07 Dec 2012 Link to this post

    Hello,

    I tested the provided code, but everything works as expected on my end. Attached, you can find the project, which I used for testing. Please review it and let me know what I am missing.

    Greetings,
    Milena
    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.
  8. Susan
    Susan avatar
    137 posts
    Member since:
    Jul 2007

    Posted 25 Jan 2013 Link to this post

    You have no 'button' on the page. If you add a button to your example and click it, the 'Required' shows up in the middle of the textbox, not at the end.

    Thanks,
    Susan
  9. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Jan 2013 Link to this post

    Hi Susan,

    You could style the  RequiredFieldValidator to some 5% to the left and it should work as expected.
    aspx:
    <asp:RequiredFieldValidator ID="rfvDonationPurpose" CssClass="Normal" ControlToValidate="DonationPurpose"
    ErrorMessage="Required." Display="dynamic" runat="server"></asp:RequiredFieldValidator>
    CSS
    <style type="text/css">
    .Normal
    {
       margin-left:5%;
    }
    </style>

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