var col1 = new GridDataVisibleColumn();
col1.HeaderText = "Machine";
col1.MappingName = "Machine";
runDataGrid.VisibleColumns.Add(col1);
var col2 = new GridDataVisibleColumn();
col2.Binding = new Binding("{Binding Path=RunValues[Country].Value,Mode=TwoWay}");
col2.HeaderText = "Country";
col2.MappingName = "RunValues[Country].Value";
runDataGrid.VisibleColumns.Add(col2);
Binding colbinding = new Binding();
colbinding.Path = new PropertyPath("ShipDetails[ShipCountry].Value");
colbinding.Mode = BindingMode.TwoWay;
col2.Binding = colbinding;
col2.HeaderText = "ShipCountry1";
col2.MappingName = "ShipDetails[ShipCountry].Value";
dataGrid.VisibleColumns.Add(col2); |