Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 4th, 2012  |  syntax: None  |  size: 0.92 KB  |  views: 25  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.             StackPanel tSp = new StackPanel();
  2.             DataGrid taxRateDataGrid = new DataGrid();
  3.             DataGridTextColumn col0 = new DataGridTextColumn();
  4.             DataGridTextColumn col1 = new DataGridTextColumn();
  5.             DataGridCheckBoxColumn col2 = new DataGridCheckBoxColumn();
  6.  
  7.  
  8.             taxRateDataGrid.Columns.Add(col0);
  9.             taxRateDataGrid.Columns.Add(col1);
  10.             taxRateDataGrid.Columns.Add(col2);
  11.  
  12.             col0.Binding = new Binding("Rate");
  13.             col1.Binding = new Binding("Mark");
  14.             col2.Binding = new Binding("isChecked");
  15.  
  16.             col0.Header = "Stawka";
  17.             col1.Header = "Oznaczenie";
  18.             col2.Header = "Status";
  19.  
  20.  
  21.  
  22.             taxRateDataGrid.Items.Add(new TaxRateFromDatabase { Rate = 1, Mark = "E", IsChecked = true});
  23.             taxRateDataGrid.Items.Add(new TaxRateFromDatabase { Rate = 23, Mark = "F", IsChecked = false });