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

Inconsistent rendering of labels on controls

1 Answer 76 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ramez
Top achievements
Rank 1
Ramez asked on 29 Mar 2012, 08:13 PM
I'm using the label attribute on controls to display the labels rather than having to define a table with a label object then the control object. It seems that they don't render correctly or not at all.

In the example below I have a radtextbox, radcombobox, and a datepicker. When the page renders the combobox displays the label but is indented a few pixes to the right. The label for a datepicker does not work at all.

Are these bugs or am I using them incorrectly?

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="testpage.aspx.cs" Inherits="GEPApps.testpage" %>

 <% @ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

 

<! 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title></title>

<style type="text/css">

 .formlabel {

display: block; /* block float the labels to left column, set a width */

float : left;

width: 140px;

padding: 0;

margin: 5px 0 0; /* set top margin same as form input - textarea etc. elements */

text-align: right;

}

.formEntry {

 margin:5px 0 0 10px;
 
}

}

</

style>  

</head>

 <body>

<form id="form1" runat="server">

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />

<div>

<br />

 <telerik:RadTextBox ID="txt_city" runat="server" Width="300px" CssClass="formEntry" Label="City:" LabelCssClass="formlabel" />

 <br />

 <telerik:RadComboBox ID="cmb_countries" runat="server" AutoPostBack="true" CssClass="formEntry" Label="Country:" LabelCssClass="formlabel" Height="140px" Width="250px" MarkFirstMatch="true" CausesValidation="false"></telerik:RadComboBox>

 <br />

 <telerik:RadDatePicker runat="server" ID="cal_ExportDate" DateInput-Label="Date:" CssClass="formEntry" >

<DateInput ID="DateInput1" DateFormat="yyyy-MM-dd" Label="Date:" runat="server"></DateInput>

 </telerik:RadDatePicker>

</div>

</form>

</body>

</html>

 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 30 Mar 2012, 07:11 AM
Hello Ramez,

I also observed the same behavior in older version(2011, 1, 315, 35). I found the required behavior working as expected in the latest version(2012, 1, 215, 35). So please try upgrading to the latest version.

Thanks,
Shinu.
Tags
General Discussions
Asked by
Ramez
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or