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

Datepicker Selection changed event with MVVM

0 Answers 351 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
rajesh
Top achievements
Rank 1
rajesh asked on 14 Nov 2011, 10:00 AM

Hi
 I am facing a small issue with 'Telrik Datepicker Selection changed event', code behind it all work perfectly, but when i use following code with MVVM pattern, SelectionChanged  event  not at all firing. but the same giving result with Button Element, any thing i need more here to get result from Telrik Datae Picker

 

        public RelayCommand<Telerik.Windows.Controls.SelectionChangedEventArgs> DateSelectionCommand
        {
            get;
            private set;
        }
 
DateSelectionCommand = new RelayCommand<Telerik.Windows.Controls.SelectionChangedEventArgs>(ShowMachineTime);

 

<telerik:RadDatePicker Grid.Column="1" Height="23"   Name="dpCurrentDate" VerticalAlignment="Center" HorizontalAlignment="Right" Width="126">
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="SelectionChanged">
                        <E2C:EventToCommand  Command="{Binding DateSelectionCommand}" ></E2C:EventToCommand>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </telerik:RadDatePicker>
<Button   Grid.Column="1"  Grid.Row="0"   x:Name="addButton"  Content="Add New" Width="100"  Height="30" HorizontalAlignment="Left" Command="{Binding DateSelectionCommand}" />

No answers yet. Maybe you can help?

Tags
DatePicker
Asked by
rajesh
Top achievements
Rank 1
Share this question
or