+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / RadInput in 3.1 module

RadInput in 3.1 module

4 posts, 0 answered
  1. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    17 Oct 2007
    Link to this post
    Good evening I have a RadInput in a module with no Skin specified. Therefore it should be using the default skin for the RadInput however the view source shows that the total width of the wrapper is set to 100px. This squishes (that is the technical term) the label and RadTextBox to 100px. The tablecell is also set to 100% so you even if you manually override the inline style, you still get a squished label because the textbox consumes any additional space. Below is the rendered markup for one RadInput.

    <div id="ctl00_ContentPlaceHolder1_contolPanel_AdminFixedQuantity1_fieldUpdateDescription_wrapper" class="radInput_Default" style="display:inline;zoom:1;width:100px;height:20px;">  
                        <!-- 2.1.0 --><span id="ctl00_ContentPlaceHolder1_contolPanel_AdminFixedQuantity1_fieldUpdateDescriptionStyleSheetHolder" style="display:none;"></span><table cellpadding="0" cellspacing="0" border="0" style="width:100%;">  
                            <tr> 
                                <td><label class="radLabelCss_Default" for="ctl00_ContentPlaceHolder1_contolPanel_AdminFixedQuantity1_fieldUpdateDescription_text" id="ctl00_ContentPlaceHolder1_contolPanel_AdminFixedQuantity1_fieldUpdateDescription_Label">Description</label></td><td class="inputCell" style="width:100%;height:100%;"><input type="text" size="15" id="ctl00_ContentPlaceHolder1_contolPanel_AdminFixedQuantity1_fieldUpdateDescription_text" style="width:100%;" /><input style="visibility: hidden;position:absolute;right:0;width:0;height:0;overflow:hidden;border:0;padding:0;margin:0;" id="ctl00_ContentPlaceHolder1_contolPanel_AdminFixedQuantity1_fieldUpdateDescription" name="ctl00$ContentPlaceHolder1$contolPanel$AdminFixedQuantity1$fieldUpdateDescription" type="text" value="test5" /></td>  
                            </tr> 
                        </table><script type="text/javascript">window["ctl00_ContentPlaceHolder1_contolPanel_AdminFixedQuantity1_fieldUpdateDescription"] = new RadTextBox("ctl00_ContentPlaceHolder1_contolPanel_AdminFixedQuantity1_fieldUpdateDescription", {"PostBackEventReferenceScript":"","AutoPostBack":false,"EmptyMessage":"","SelectionOnFocus":0,"ClientEvents":{"OnError":"","OnButtonClick":"","OnLoad":"","OnMouseOut":"","OnMouseOver":"","OnFocus":"","OnBlur":"","OnDisable":"","OnEnable":"","OnValueChanged":"","OnKeyPress":"","OnEnumerationChanged":"","OnMoveUp":"","OnMoveDown":"","OnShowHint":""},"ShowButton":false,"ButtonsPosition":1,"Enabled":true}, {HoveredStyle: ["height:20px;width:125px;", "radHoverCss_Default"],InvalidStyle: ["height:20px;width:125px;", "radInvalidCss_Default"],DisabledStyle: ["height:20px;width:125px;", "radDisabledCss_Default"],FocusedStyle: ["height:20px;width:125px;", "radFocusedCss_Default"],EmptyMessageStyle: ["height:20px;width:125px;", "radEmptyMessageCss_Default"],EnabledStyle: ["height:20px;width:125px;", "radEnabledCss_Default"]});</script> 
                    </div> 

    Thanks for your help,

    Sincerely,

    Ben
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    17 Oct 2007
    Link to this post
    Hello Ben,

    You could override this by setting the Width property of RadTextBox control. For example:

    <radI:RadTextBox ID="RadTextBox1" runat="server" Width="200px"></radI:RadTextBox> 
     

    RadTextBox has a method that sets default size for Width and Height if they are not explicitly specified.

    Hope this helps.

    Regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. bnye
    bnye avatar
    332 posts
    Registered:
    22 Sep 2005
    17 Oct 2007
    Link to this post
    Yes, but that simply grows the textbox without allowing the label to grow. There doesn't appear to be a way to specify how much of that width goes to the labelcell and how much goes to the inputcell. Am I missing something simple.

    Sincerely,

    Ben
  4. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    18 Oct 2007
    Link to this post
    Hello Ben,

    You could change the style settings of the class .radLabelCss_[skinName] in the css file of the skin you are using. Here is a sample code how to set a fixed width of the RadTextBox label:

    <style type="text/css"
        .radLabelCss_Default 
        { 
            width: 100px;        
            float:left; 
        } 
    </style> 
     
    <radI:RadTextBox  
        ID="RadTextBox1"  
        runat="server"  
        Width="200px"  
        EmptyMessage="Type Here"  
        Label="Default Label: "
    </radI:RadTextBox> 

    Hope this helps.

    All the best,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
4 posts, 0 answered