ItemSource = DataTable?

Jan 29, 2009 at 8:22 AM

how can i use a DataTable as ItemSource?

For example:
_ds  = GetDataSet();
this._dataGrid.ItemsSource = _ds.Tables[0]; //dont work.

I found this topic but there will be set the ItemSource in the xaml Code. I have to set this in C#. I need something lik this _dataGrid.ItemSource = _datatabel.
Jan 29, 2009 at 8:31 AM
Okay i got it dataGrid.ItemsSource = DataTable.DefaultView;