• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 908
  • Last Modified:

load telerik:RadDatePicker

When I load telerik:RadDatePicker with
            txtIDate.SelectedDate.Value = dsClerk.Tables["Incident"].Rows[0]["dateI"];

I get the error -
Property or indexer 'system.Nullable<System.DateTime>.Value' cannot be assigned to -- it is read only.

I changed a property like EnableTyping="false", it's not working and it is actually not what iI want. Please help.
0
minglelinch
Asked:
minglelinch
1 Solution
 
ajb2222Commented:
the datacolumn is set to readonly

dsClerk.Tables["Incident"].Columns["dateI"].ReadOnly = false
0
 
ajb2222Commented:
oops my bad I read the statement backwords.  

the txtIDate.SelectedDate.Value property is read only.

I think you just set the value of the txtIDate.

txtIDate.Value = dsClerk.Tables["Incident"].Rows[0]["dateI"];
0
 
TheMozzCommented:
I use Telerik controls quite a bit, including date picker controls, you set the SelectedDate property:

txtIDate.SelectedDate = dsClerk.Tables["Incident"].Rows[0]["dateI"];

Here is a line from one of my pages:

this.RadDatePickerDateFrom.SelectedDate = DateTime.Parse("1/1/2009");

0
 
minglelinchAuthor Commented:
Thank you. It works.
0
 
Kumaraswamy RCommented:
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now