//When the user selects a row in the datagrid private void dgv_Area_SelectionChanged(object sender, SelectedCellsChangedEventArgs e) { if (arearegion.ASearchControl.ResultsGrid.SelectedItem != null) { EditingAreaRegion = (arearegion.ASearchControl.ResultsGrid.SelectedItem as FIN_Area).Clone() as FIN_Area; } }
//This is a event which fires whenever newitems arrive at the datagrid private void ItemSourceChanged(object sender, EventArgs e) { AreaRegionInformation = arearegion.ASearchControl.ResultsGrid.ItemsSource as ObservableCollection <FIN_Area>; arearegion.AreaGrid.DataContext = AreaRegionInformation; if (AreaRegionInformation[0] != null) { EditingAreaRegion = AreaRegionInformation[0].Clone(); } }