要在DatagridTextColumn中添加Datatable列
//Iterate the Datatable and bind into Datagrid
foreach (DataColumn col in tb.Columns)
{
string colname = col.ColumnName;
GatewayPortsDataGrid.Columns.Add(new DataGridTextColumn
{
Header = colname,
Binding = new Binding(string.Format("[{0}]", colname)),
});
}