Solved

RadDatePicker Value

Posted on 2010-11-20
5
1,464 Views
Last Modified: 2012-05-10

I have the following piece of code working -      
   <ItemTemplate>
            <asp:Label ID="Label5" runat="server" Text='<%# Bind("payDate") %>'></asp:Label>  
   </ItemTemplate>

Now I want to change the above label to a RadDatePicker. I used the following code -
   <ItemTemplate>
         <telerik:RadDatePicker ID="RadDate" runat="server" CssClass="Textbox"
                     Calendar-SelectedDate='<%# Bind("payDate") %>' DateInput-ReadOnly="true">
   </telerik:RadDatePicker>
      </ItemTemplate>

The above code is not working. What would the correct way to chnage it?

Another thing -
I went through all the properties of telerik:RadDatePicker, trying to find the one to set the datebox with a specific date, but I did not find it.

Please help. Thanks.
0
Comment
Question by:minglelinch
5 Comments
 
LVL 12

Expert Comment

by:jagssidurala
ID: 34181876
Try the  DbSelectedDate property to bind the date from the database

DbSelectedDate='<%# Bind("StartDate") %>'

Also
refer these links

http://demos.telerik.com/aspnet-ajax/calendar/examples/datepicker/databinding/defaultcs.aspx




0
 
LVL 16

Accepted Solution

by:
BurnieP earned 500 total points
ID: 34183306
I just use SelectedDate property : (Assuming the format is DD/MM/YYYY)

   <ItemTemplate>
         <telerik:RadDatePicker ID="RadDate" runat="server" CssClass="Textbox" SelectedDate='<%# Bind("payDate") %>' DateInput-ReadOnly="true">
         </telerik:RadDatePicker>
   </ItemTemplate>

0
 
LVL 1

Author Comment

by:minglelinch
ID: 34188036
It works by using DbSelectedDate property.
Using SelectedDate encountered Invalid Case eoor.
Thanks. The problem is resolved.
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 34387748
This question has been classified as abandoned and is being closed as part of the Cleanup Program.  See my comment at the end of the question for more details.
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question