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

[Solved] hook the button OK event?

4 Answers 130 Views
DatePicker for XAML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Eirik
Top achievements
Rank 1
Eirik asked on 03 Jun 2013, 03:03 PM
I am testing the raddatepicker, and i cannot find anywhere to get the event when user presses button 'Ok' on the selector part of the Control. How can I achive this?

4 Answers, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 05 Jun 2013, 08:06 AM
Hello Eirik,

Thank you for your interest.

You can track when the OK button is pressed through the RadDatePicker.ValueChanged event.

I hope this helps. Let me know if you need further assistance.

 

Regards,
Ivaylo Gergov
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Eirik
Top achievements
Rank 1
answered on 12 Jul 2013, 01:14 PM

Hello!

I have troubled With that the valuechanged event is fired when the window is opened and the bindings occour.

Should i registrer the event at other Place than design, or is it at better solution somewhere?

Regards,

Eirik

0
Eirik
Top achievements
Rank 1
answered on 12 Jul 2013, 01:14 PM

Hello!

I have troubled With that the valuechanged event is fired when the window is opened and the bindings occour.

Should i registrer the event at other Place than design, or is it at better solution somewhere?

Regards,

Eirik

0
Giuseppe
Telerik team
answered on 12 Jul 2013, 02:43 PM
Hello Eirik,

The observed behavior is normal and by design (ValueChanged event is correctly raised on initial binding as well). Generally there is no easy way for you to distinguish the source of the ValueChanged event (i.e. what triggered it) so if you really need to distinguish the OK button click action, you will need to retemplate the datepicker control and directly hook the Button.Click event of the OkButton template part.

See the attached sample application that demonstrates this approach. Hope this helps.


Regards,
Giuseppe
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
DatePicker for XAML
Asked by
Eirik
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Eirik
Top achievements
Rank 1
Giuseppe
Telerik team
Share this question
or