Home › Forums › WPF controls › Xceed DataGrid for WPF › How to bind the grid to DB.
I looked for for the way of binding the grid to DataBase (specially SQL Server) in the documentation of the product but i could’nt find it.
so can you tell me how to do that ? and it will be appreciated.
Thank you for help.
Imported from legacy forums. Posted by NAHR_ELGANNAH (had 528 views)
This is an example where ds is your Dataset
// set an Xceed DataGridCollectionView using DataTable as its source. _dataGridCollectionView = new DataGridCollectionView(ds.Tables.DefaultView);
// Bind the grid to the Xceed DataGridCollectionView. DataGrid.ItemsSource = _dataGridCollectionView;
Imported from legacy forums. Posted by daniel (had 2774 views)