예제 #1
0
        //Stop generating columns for fields which don't have the [DataMember] attribute;See entity.cs

        //When the user selects a row in the datagrid
        private void dgv_FixedTxnAttributes_SelectionChanged(object sender, SelectedCellsChangedEventArgs e)
        {
            if (transaction.FTASearchControl.ResultsGrid.SelectedItem != null)
            {
                EditingFixedTxnAttribute = (transaction.FTASearchControl.ResultsGrid.SelectedItem as ERP_FixedTxnAttributes).Clone() as ERP_FixedTxnAttributes;
            }
        }
예제 #2
0
 //This is a event which fires whenever newitems arrive at the datagrid
 private void ItemSourceChanged(object sender, EventArgs e)
 {
     FixedTxnAttributes = transaction.FTASearchControl.ResultsGrid.ItemsSource as ObservableCollection <ERP_FixedTxnAttributes>;
     transaction.FixedTransactionAttribGrid.DataContext = FixedTxnAttributes;
     if (FixedTxnAttributes.Count > 0)
     {
         EditingFixedTxnAttribute = FixedTxnAttributes[0].Clone();
     }
 }