Ejemplo n.º 1
0
 //When the user selects a row in the datagrid
 private void dgv_JobSpecification_SelectionChanged(object sender, SelectedCellsChangedEventArgs e)
 {
     if (JobSpecification.JobSpecificationSearchControl.ResultsGrid.SelectedItem != null)
     {
         EditingJobSpecificationInfomation = (JobSpecification.JobSpecificationSearchControl.ResultsGrid.SelectedItem as HR_EMP_JOBSPEC).Clone() as HR_EMP_JOBSPEC;
     }
 }
Ejemplo n.º 2
0
 //This is a event which fires whenever newitems arrive at the datagrid
 private void ItemSourceChanged(object sender, EventArgs e)
 {
     JobSpecificationInformation = JobSpecification.JobSpecificationSearchControl.ResultsGrid.ItemsSource as ObservableCollection <HR_EMP_JOBSPEC>;
     JobSpecification.JobSpecificationGrid.DataContext = JobSpecificationInformation;
     if (JobSpecificationInformation.Count > 0)
     {
         EditingJobSpecificationInfomation = JobSpecificationInformation[0].Clone();
     }
 }