<telerik:RadGridView Name="StudentInfoGrid" Grid.Row="2" Grid.ColumnSpan="2" ItemsSource="{Binding studentCollection}" SelectedItem="{Binding SelectedStudentInfo,Mode=TwoWay}" IsReadOnly="True" SelectionChanged="StudentInfoGrid_SelectionChanged" SelectionMode="Single"> <telerik:GridViewDataControl.Columns> <telerik:GridViewDataColumn Header="studnet" DataMemberBinding="{Binding studentname}" TextAlignment="Left" Width="*"> </telerik:GridViewDataColumn> <telerik:GridViewDataColumn x:Name="StartDate_GridView" Header="Start Date" DataMemberBinding="{Binding egStartDate,Converter={StaticResource dateConverter}}" MaxWidth="100" /> <telerik:GridViewDataColumn Header="End Date" DataMemberBinding="{Binding egEndDate,Converter={StaticResource dateConverter}}" MaxWidth="100" /> </telerik:GridViewDataControl.Columns> </telerik:RadGridView> <telerik:RadDatePicker x:Name="SetStartDate" Grid.Row="0" Grid.Column="1" SelectedValue="{Binding Path=listBoxSelectedItems.SelectedItems.egStartDate,Mode=TwoWay,Converter={StaticResource dateConverter}}" Width="150" HorizontalAlignment="Left" DisplayFormat="Long" Height="25" />
private void EmployeeGroupbtnClick(object sender, RoutedEventArgs e) { if (listBoxSelectedItems.SelectedIndex != -1) { //MessageBox.Show(SetStartDate.SelectedValue.ToString()); DateTime datePicker1 = SetStartDate.SelectedDate.Value; //DateTime datepicker2 = SetEndDate.SelectedDate.Value; foreach(var a in listBoxSelectedItems.SelectedItems) { Setdate(datePicker1); ViewModel.SaveEmployeeGroupAssoc(a as EmployeeGroupAssocData); } } } public void Setdate(DateTime datePicker1) { this.ViewModel.EditedEmployeeGroupAssoc.OriginalEmployeeGroupAssoc.egStartDate = datePicker1; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)