Welcome Guest Search | Active Topics | Sign In | Register

datepicker: How to allow null values? Options
thielmag
Posted: Thursday, August 27, 2009 11:40:02 PM
Rank: Newbie
Groups: Member

Joined: 8/27/2009
Posts: 2
I am evaluating your datepicker control. I have run into a problem when the database value is null, datepicker throws a "Conversion from type 'DBNull' to type 'Date' is not valid" error. How do I avoid the error.

I have been using Excentrics World's control in the past and there was a Nullable property. I haven't found similar property in the documentation.

Can you please help? Other than that, I like what I am seeing with this control and will probably buy the whole suite.

UPDATE: I found in the documentation where it specifies SelectedDate does not accept dbnull.value and it says to use SelectedDateString but I can't enable my Databinding to this property...it doesn't exist there or in thelist of properties on the control. I must be missing something still.
eo_support
Posted: Friday, August 28, 2009 7:21:27 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

SelectedDateString is the correct property for you to use. It does not show up the property window because it is meant to be used by code or data binding.

Thanks!
thielmag
Posted: Friday, August 28, 2009 11:35:28 AM
Rank: Newbie
Groups: Member

Joined: 8/27/2009
Posts: 2
Thanks. I just set the selectedvalue/binding to SelectedDateString in the Source and all is well.

Thank you.
eo_support
Posted: Friday, August 28, 2009 11:37:21 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Cool. Please feel free to let us know if you have any other questions.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.