SHARE
TWEET

Untitled

a guest Sep 4th, 2012 32 Never
  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 });
RAW Paste Data
Top