Exemplo n.º 1
0
 //When the user selects a row in the datagrid
 private void dgv_DocumentAttributesRefModel_SelectionChanged(object sender, SelectedCellsChangedEventArgs e)
 {
     if (document.DARSearchControl.ResultsGrid.SelectedItem != null)
     {
         EditingDocumentAttributesRef = (document.DARSearchControl.ResultsGrid.SelectedItem as ERP_DocumentAttributesRef).Clone() as ERP_DocumentAttributesRef;
     }
 }
Exemplo n.º 2
0
 //This is a event which fires whenever newitems arrive at the datagrid
 private void ItemSourceChanged(object sender, EventArgs e)
 {
     DocumentAttributesRefInformation = document.DARSearchControl.ResultsGrid.ItemsSource as ObservableCollection <ERP_DocumentAttributesRef>;
     document.DocumentAttributesRefGrid.DataContext = DocumentAttributesRefInformation;
     if (DocumentAttributesRefInformation.Count > 0)
     {
         EditingDocumentAttributesRef = DocumentAttributesRefInformation[0].Clone() as ERP_DocumentAttributesRef;
     }
 }