Home Forums WPF controls Xceed DataGrid for WPF How to bind the grid to DB.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #25004 |

    Hi all,

    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)

    User (Old forums)
    Member
    Post count: 23064

    This is an example where ds is your Dataset

    // set an Xceed DataGridCollectionView using DataTable as its source.
    _dataGridCollectionView = new DataGridCollectionView(ds.Tables[0].DefaultView);

    // Bind the grid to the Xceed DataGridCollectionView.
    DataGrid.ItemsSource = _dataGridCollectionView;

    Imported from legacy forums. Posted by daniel (had 2774 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.