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

RadDatePicker and DataForm doesn't work together

9 Answers 309 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
uku
Top achievements
Rank 1
uku asked on 11 Nov 2009, 06:38 PM
Hello,

I'm using RIA services and have a dataform which includes a RadDatePicker.
When I select another date from the datepicker the dataform doesn't notice that and the OK button remains disabled.
So when I want to have an enabled OK button to store the new date I always have to make a dummy modification in another control e.g. in a text box.

How can I handle it to force the dataform to take notice of the date modification.

The definition of the RadDatePicker in the dataform is shown below

<dataform:DataField Grid.Row="0" Grid.Column="1" Label="Creation" LabelPosition="Top"  Width="120"  HorizontalAlignment="Left">  
     <telInput:RadDatePicker SelectedDate="{Binding Path=CreationDate, Mode=TwoWay, UpdateSourceTrigger=Explicit}"/>  
</dataform:DataField> 
 

Thanks for your help

Uwe
T

9 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 16 Nov 2009, 11:53 AM
Hello uku,

I am sorry for the problem you are facing with our RadDatePicker control. Sharing some more code with us will be of great help for us.

Kind regards,
Kaloyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Rameshkumar Gundalapudi Vijayakumar
Top achievements
Rank 1
answered on 23 Apr 2010, 05:28 PM
Hi,

Actually i have a similar requirement as with uku.

I have a RadDatePicker where i can type the date and also i select a date.

I have a save button which should become enabled the moment i change the date in date picker.

Problem is only when i change the date using datepicker, the save is getting triggered. If i type in a date, only when the datepicker is lost focus, save is getting enabled. I want the save to be enabled the moment i type in some text using keyboard in the datepicker text box.

I am using the following code and it is not working

SelectedDate

 

 

="{Binding Path=SampleDate,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"

 

0
Kaloyan
Telerik team
answered on 28 Apr 2010, 09:27 AM
Hi Rameshkumar Gundalapudi Vijayakumar,

The problem is that the typed value in the TextBox of the control is parsed to a valid date after loosing its focus. That means that the property will be updated after lost focus of the control. In your case you can use the KayUp event of the control to change the enabled condition of the button. Let us know if you need any further help.

Kind regards,
Kaloyan
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.
0
Rameshkumar Gundalapudi Vijayakumar
Top achievements
Rank 1
answered on 28 Apr 2010, 10:14 AM
Hi Kaloyan,

Is there any way to do this in XAML itself, as i am using MVVM architectur. Please refer the below thread. WPF datepicker works as expected.

http://www.telerik.com/community/forums/wpf/datepicker/raddatepicker-and-updatesourcetrigger.aspx

Thanks,
Ramesh.
0
Kaloyan
Telerik team
answered on 29 Apr 2010, 02:35 PM
Hi Rameshkumar Gundalapudi Vijayakumar,

Actually adding such a text property is probably the most correct way that will be applied in MVVM scenarios. We will consider adding it in some of the next control version. Please find the attached demo as a workaround of the current limitation.

Best wishes,
Kaloyan
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.
0
Kjetil
Top achievements
Rank 1
answered on 20 Jan 2014, 12:22 PM
Hi,

This solution doesn't really help for us. We have designed the app to have 'auto save', so that when the user navigates to another screen the changes on the current screen will be automatically saved. When the user inputs a date in the RadDateTimePicker using text and not the gui date picker, these changes will not be picked up by the view model when the user navigates away. 

Is there any updates on the RadDateTimePicker that can force the date parsing when the properyt changes?
0
Kalin
Telerik team
answered on 23 Jan 2014, 09:01 AM
Hi Kjetil,

We tested the described scenario with the latest release version of the controls (Q3 2013 SP1) and it worked as expected. I have bound the SelectedValue property of the DatePicker to a property in the ViewModel and when you type a date and change the view the value of the property in the ViewModel changes. I'm attaching my test project so you can check it

Hope this helps. If you have any further concerns or questions let us know.

Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Kjetil
Top achievements
Rank 1
answered on 23 Jan 2014, 12:43 PM
The attached project is a Silverlight project. Do you have the same example as WPF?
0
Kalin
Telerik team
answered on 24 Jan 2014, 09:48 AM
Hi Kjetil,

You can use the same code for a WPF without a problem.

Please try that and let us if you have any further concerns or questions.

Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
DatePicker
Asked by
uku
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Rameshkumar Gundalapudi Vijayakumar
Top achievements
Rank 1
Kjetil
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or