//When the user selects a row in the datagrid void dgv_Currency_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (Currency.CurrencySearchControl.ResultsGrid.SelectedItem != null) { EditingCurrencyInfomation = (Currency.CurrencySearchControl.ResultsGrid.SelectedItem as FIN_Currency).Clone() as FIN_Currency; } }
//This is a event which fires whenever newitems arrive at the datagrid private void ItemSourceChanged(object sender, EventArgs e) { CurrencyInformation = Currency.CurrencySearchControl.ResultsGrid.ItemsSource as ObservableCollection <FIN_Currency>; Currency.CurrencyGrid.DataContext = CurrencyInformation; if (CurrencyInformation[0] != null) { EditingCurrencyInfomation = CurrencyInformation[0].Clone(); } }