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

Issues with GridViewDataColumn CellEditTemplate

1 Answer 216 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 06 Apr 2010, 01:28 AM
I have an issue with using a TimePicker inside my RadGridView.  Here's my XAML:

<telerik:GridViewDataColumn Header="Start Time" DataMemberBinding="{Binding SStartTime, Mode=TwoWay}"
                    <telerik:GridViewDataColumn.CellTemplate> 
                        <DataTemplate> 
                            <TextBlock Text="{Binding SStartTime, Mode=TwoWay, Converter={StaticResource TimeStringConverter}}" /> 
                        </DataTemplate> 
                    </telerik:GridViewDataColumn.CellTemplate> 
                    <telerik:GridViewDataColumn.CellEditTemplate> 
                        <DataTemplate> 
                            <telerik:RadTimePicker SelectedTime="{Binding SStartTime, Mode=TwoWay}" StartTime="0:0:0" EndTime="23:0:0"/> 
                        </DataTemplate> 
                    </telerik:GridViewDataColumn.CellEditTemplate> 
                </telerik:GridViewDataColumn> 

So, everything is fine if I use the TimePicker to select the time using my mouse.  If I type a time in to the control and don't select the time with my mouse the underlying data is NOT updated (and on the TimePicker control this usually works fine).  Any thoughts?

1 Answer, 1 is accepted

Sort by
0
Stefan Dobrev
Telerik team
answered on 06 Apr 2010, 10:22 AM
Hi Dean,

The problem is that the value of the RadTimePicker is updated on lost focus event of the editor. When this lost focus event happens it is too late, because RadGridView has already committed the new value to the underlying property of you object.

We plan to introduce UpdateValueEvent property on RadTimePicker control, similarly as we did in RadNumericUpDown control. This property will allow you to change the behavior of the control so that whenever a valid value is entered into the text box it will be immediately set on your business object.

All the best,
Stefan Dobrev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Dean
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
Share this question
or