This is a migrated thread and some comments may be shown as answers.

How to bind TimePicker to TimeSpan field?

9 Answers 1032 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
miksh
Top achievements
Rank 1
Iron
miksh asked on 19 Sep 2008, 01:11 PM
Does TimePicker support binding to TimeSpan? I didn't find any code samples or description in documentation.

9 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 22 Sep 2008, 02:28 PM
Hello Michael,

Please test the sample website attached to this thread.

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
miksh
Top achievements
Rank 1
Iron
answered on 22 Sep 2008, 03:30 PM
Thanks for the sample. It shows the way to display TimeSpan value which I had no problem with too.
Could you change you sample to add "edit" functionality with using <telerik:BoundColumn> or <%# Bind%>?
0
miksh
Top achievements
Rank 1
Iron
answered on 24 Sep 2008, 09:20 PM
Any updates? Please let me know if it's not supported so I could change BO properties from TimeStamp to DateTime.
0
Daniel
Telerik team
answered on 25 Sep 2008, 11:59 AM
Hello Michael,

Please take a look at the following link concerning the TimeStamp type:
Timestamps vs Datetime data types

A short quote:
"Ahhh. The dreaded TIMESTAMP datatype. Unfortunately you really can't use TIMESTAMP for any type of comparison. Or really for much of anything. To quote from SQL Server Books Online:

The SQL Server timestamp data type has nothing to do with times or dates. SQL Server timestamps are binary numbers that indicate the relative sequence in which data modifications took place in a database. The timestamp data type was originally implemented to support the SQL Server recovery algorithms.

It further states Never use timestamp columns in keys, especially primary keys, because the timestamp value changes every time the row is modified."


There are some helpful suggestions in the above mentioned website. I'd suggest that you read them.

Kind regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
miksh
Top achievements
Rank 1
Iron
answered on 25 Sep 2008, 01:23 PM
Sorry for misprint, I certainly meant TimeSPAN as indicated in the thread topic.
0
Daniel
Telerik team
answered on 26 Sep 2008, 02:14 PM
Hello Michael,

Could you please confirm that we answered your questions and the thread can be closed or you have more questions concerning this matter?

Best regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
miksh
Top achievements
Rank 1
Iron
answered on 26 Sep 2008, 03:09 PM
No, I am still waiting for the answer.
My question is: 
Could you change you sample by adding "edit" functionality with using <telerik:BoundColumn> or <%# Bind%>?
Please let me know if it's not supported so I could change BO properties from TimeSpan to DateTime.

0
Accepted
Missing User
answered on 29 Sep 2008, 03:22 PM
Hello miksh,


Binding a RadDatePicker, RadTimePicker, or RadDateTimePicker control to a data source is easy provided you use the DbSelectedDate property. It works almost like the SelectedDate one, but does not throw an exception when given a null value. You can't use two way data binding (<%# Bind%>) with TimeSpan object.

Best wishes,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
pandu
Top achievements
Rank 1
answered on 13 Mar 2009, 03:20 PM
for the sample code

I dont have telerik.web.UI namespace, so I am using these two namespaces..

<%

@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebContols" TagPrefix="telerik" %>

 

<%

@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebContols" TagPrefix="telerik" %>

can i use that?? where can i fins the telerik.web.ui nameapace..

 

Tags
Calendar
Asked by
miksh
Top achievements
Rank 1
Iron
Answers by
Daniel
Telerik team
miksh
Top achievements
Rank 1
Iron
Missing User
pandu
Top achievements
Rank 1
Share this question
or