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

DatePicker with Label at runtime VB.net

3 Answers 181 Views
Input
This is a migrated thread and some comments may be shown as answers.
Luiz
Top achievements
Rank 1
Luiz asked on 29 Nov 2010, 10:54 AM
Hi,

I didn't find Label property for DatePicker.
How can I do to appears Label, TextBox to input date and Button for calendar (with VB.net at runtime)?

Tks

Luiz

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 29 Nov 2010, 12:02 PM
Hello,


I read from some forums that the DatePicker rendering does not allow adding the built-in RadInput label and hence you can use standard ASP:Label control instead.

Here are the related forums:
RadDatePicker and Label
RadDatePicker and AssociatedControlID


-Shinu.
0
Luiz
Top achievements
Rank 1
answered on 29 Nov 2010, 01:23 PM
Shinu,

Tks for your reply.
I thought to put a ASP label before DatePicker, but how can I handle the theme behavior? Is it working with ASP Label also?

See ya

Luiz
0
Dimo
Telerik team
answered on 30 Nov 2010, 08:57 AM
Hi Luiz,

RadControls styles will not be applied to an external <label> element automatically. However, you have two options:

1) Use RadFormDecorator to style (decorate) label elements.

or

2) Apply some RadControls CSS classes to the external label and its wrapper:

<%@ Page Language="C#" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
<head runat="server">
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>RadControls</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
 
<label for="RadDatePicker1_dateInput_text">default label</label>
<telerik:RadDatePicker ID="RadDatePicker1" runat="server" />
 
<br /><br /><br />
 
<span class="RadInput RadInput_Default"><label class="riLabel" for="RadDatePicker2_dateInput_text">styled label</label></span>
<telerik:RadDatePicker ID="RadDatePicker2" runat="server" />
 
</form>
</body>
</html>


Kind regards,
Dimo
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Input
Asked by
Luiz
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Luiz
Top achievements
Rank 1
Dimo
Telerik team
Share this question
or