datagrid datatable code example Example: setting datagrid itemssource to datatable DGrid.ItemsSource = dt.AsDataView();