Welcome Guest Search | Active Topics | Sign In | Register

How to Databind a Date Picker Options
nikol3x
Posted: Thursday, April 1, 2010 10:06:39 AM
Rank: Newbie
Groups: Member

Joined: 4/1/2010
Posts: 4
I'm having issues trying to databind the date picker in my asp.net detailsView. I'm starting to wonder if it is even possible. The code i'm using is:

<asp:TemplateField HeaderText="Date">
<ItemTemplate>
<eo:DatePicker ID="DatePicker1" runat="server" SelectedDates='<%# Bind("Date") %>'>
</eo:DatePicker>
</ItemTemplate>
</asp:TemplateField>

Please help, I'm a newbie..
eo_support
Posted: Thursday, April 1, 2010 10:18:00 AM
Rank: Administration
Groups: Administration

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

You would bind to SelectedDataString property.

Thanks!
nikol3x
Posted: Thursday, April 1, 2010 10:39:08 AM
Rank: Newbie
Groups: Member

Joined: 4/1/2010
Posts: 4
Hi again,

The SelectedDataString property for the date picker control does not exist. I have downloaded the E.O Web Controls for ASP.NET; Is it possible to databind the date picker with my version?

Thanks
eo_support
Posted: Thursday, April 1, 2010 10:41:11 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Just type it in. It is there. It's an advanced property so you won't see it in the list.

Thanks!
nikol3x
Posted: Thursday, April 1, 2010 10:51:28 AM
Rank: Newbie
Groups: Member

Joined: 4/1/2010
Posts: 4
Hello again,
Yea I tried that so I guess I'm doing something wrong here's my code:

Code: HTML/ASPX
<eo:DatePicker ID="DatePicker1" runat="server" SelectedDataString='<%# Bind("Date") %>'>
                        </eo:DatePicker>


However, I'm coming up with this error message.

Parser Error Message: Two-way binding is only supported for properties. 'SelectedDataString' is not a valid property on 'DatePicker'
eo_support
Posted: Thursday, April 1, 2010 10:54:27 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Sorry. It should be SelectedDateString, not SelectedDataString.

Thanks!
nikol3x
Posted: Thursday, April 1, 2010 10:57:06 AM
Rank: Newbie
Groups: Member

Joined: 4/1/2010
Posts: 4
Hello Again,
Oh, Kinda obvious... Haha, I think it's too early in the morning for me. Thanks so much.
eo_support
Posted: Thursday, April 1, 2010 11:00:52 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
You are welcome. Please feel free to let us know if you have any more questions.

Thanks!


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.