Hi:
I want to edit a time (from a bound datetime column) in a RadGridView.
I've defined the grid column as follows:
I have two problems:
1. The time displays in the TextBlock as mm/dd/yy hh:mm tt. How can I format the TextBlock to just show the time? BTW, the following does not work. It leaves the time blank. (THe VS2010 syntax coloring has the zero black, the hh brown, the mm blue and the tt red.)
2. When I double-click the cell to edit it, the time in the timepicker is blank rather than showing the underlying time which is being edited. Shouldn't SelectedTime make it show the same time as I saw in the TextBlock?
I'm using SL4 beta.
I want to edit a time (from a bound datetime column) in a RadGridView.
I've defined the grid column as follows:
<radGridView:GridViewDataColumn Header="End Time" |
DataMemberBinding="{Binding EndTime, Mode=TwoWay}" DataFormatString="{}{0:hh:mm tt}"> |
<radGridView:GridViewDataColumn.CellTemplate> |
<DataTemplate> |
<TextBlock Text="{Binding EndTime}" /> |
</DataTemplate> |
</radGridView:GridViewDataColumn.CellTemplate> |
<radGridView:GridViewDataColumn.CellEditTemplate> |
<DataTemplate> |
<radInput:RadTimePicker |
SelectedTime="{Binding EndTime, Mode=TwoWay}" /> |
</DataTemplate> |
</radGridView:GridViewDataColumn.CellEditTemplate> |
</radGridView:GridViewDataColumn> |
I have two problems:
1. The time displays in the TextBlock as mm/dd/yy hh:mm tt. How can I format the TextBlock to just show the time? BTW, the following does not work. It leaves the time blank. (THe VS2010 syntax coloring has the zero black, the hh brown, the mm blue and the tt red.)
<TextBlock Text="{Binding EndTime, StringFormat='{}{0:hh:mm tt}'}" /> |
2. When I double-click the cell to edit it, the time in the timepicker is blank rather than showing the underlying time which is being edited. Shouldn't SelectedTime make it show the same time as I saw in the TextBlock?
I'm using SL4 beta.