Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

RadDatePicker Value

Posted on 2010-11-20
5
Medium Priority
?
1,500 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Loops Section Overview
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

885 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