I have a table that has the columns: StartTime and Endtime (ex: 15:40 and 18:20).
I use DateTime for this columns and they are binder to a gridview.
Is there any chance I can show only the time component in the column?
The GridView also allows for updates. Can I somehow specify that if 15:40 is inserted, it actually means a DateTime)?
Do you think this is possible, or should I just use and ObjectDataSource for this?
In order to show just the date component of the DateTime, you can use the DataFormatString property for an asp:BoundField. For example:
As far as the update is concerned, you would want to implement a function to handle the OnRowUpdating event for the GridView.