Guest User

Untitled

a guest
Jan 19th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.85 KB | None | 0 0
  1. <ExtendedGridControl:ExtendedDataGrid Grid.Row="5" Height="200" VerticalAlignment="Top" Grid.ColumnSpan="6" Margin="5,4,5,0" ItemsSource="{Binding InvoiceDetailsForSelectedJobInvoice, Mode=TwoWay}" AutoGenerateColumns="False">
  2.  
  3. <DataGrid.Columns>
  4. <ExtendedColumn:ExtendedDataGridTextColumn Header="Description" Width="200*" AllowAutoFilter="False"
  5. Binding="{Binding Detail_Item_Description}" />
  6. <ExtendedColumn:ExtendedDataGridTextColumn Header="Unit" Width="50" AllowAutoFilter="False"
  7. Binding="{Binding Detail_Item_Unit}" />
  8. <ExtendedColumn:ExtendedDataGridTextColumn Header="Unit Price" Width="70"
  9. Binding="{Binding Detail_Item_Unit_Price}" AllowAutoFilter="False"/>
  10. <ExtendedColumn:ExtendedDataGridTextColumn Header="# of Units" Width="70"
  11. Binding="{Binding Detail_Item_Number_Of_Units}" AllowAutoFilter="False"/>
  12. <ExtendedColumn:ExtendedDataGridTextColumn Header="Discount %"
  13. Binding="{Binding Detail_Item_Discount_Percentage}" Width="70" AllowAutoFilter="False"/>
  14. <ExtendedColumn:ExtendedDataGridTextColumn Header="Discount"
  15. Binding="{Binding Detail_Item_Discount}" Width="70" AllowAutoFilter="False"/>
  16. <ExtendedColumn:ExtendedDataGridTextColumn Header="Total" Width="70"
  17. Binding="{Binding Detail_Item_Total_Price}" AllowAutoFilter="False"/>
  18.  
  19. <DataGridComboBoxColumn Header="Revenue Allocation" Width="100*" SelectedValueBinding="{Binding Service_That_Revenue_Is_Allocated_To}" DisplayMemberPath="ServiceName" SelectedValuePath="ServiceID" ItemsSource="{Binding Source={StaticResource source}}"/>
  20. </DataGrid.Columns>
  21. </ExtendedGridControl:ExtendedDataGrid>
  22.  
  23. public class InvoiceViewModel: INotifyPropertyChanged
  24. {
  25.  
  26. public ObservableCollection<InvoiceDetail> InvoiceDetailsForSelectedJobInvoice
  27. {
  28. get
  29. {
  30. if (_selectedInvoice != null)
  31. {
  32. _invoiceDetails = new ObservableCollection<InvoiceDetail>(_selectedInvoice.InvoiceDetails);
  33. return _invoiceDetails;
  34. }
  35. return null;
  36. }
  37.  
  38. set
  39. {
  40. _invoiceDetails = value;
  41. NotifyPropertyChanged("InvoiceDetailsForSelectedJobInvoice");
  42. }
  43. }
  44.  
  45.  
  46.  
  47. public event PropertyChangedEventHandler PropertyChanged;
  48. private void NotifyPropertyChanged(String propertyName)
  49. {
  50. if (PropertyChanged != null)
  51. {
  52. PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
  53. }
  54. }
  55. }
Add Comment
Please, Sign In to add comment