hi i want to bind a DataTable with multiple columns to an DataGrid in codebehind
DataTable
DataGrid
var dt = new DataTable(); dt.Columns.Add(
Assuming you're in WPF simply say:
DGrid.ItemsSource = dt.AsDataView();
No need to manually setup your columns on your DataGrid, assigning the DataTable will set these up for you.