Hi,
is it possible to use a DataTable as ItemSource for DataGrid?
XAML:
<grid:SfDataGrid x:Name="dataGrid" AutoGenerateColumns="True"/>
C#:
DataTable table = new DataTable();
table.Columns.Add("Column1", typeof(string));
table.Columns.Add("Column2", typeof(string));
table.Columns.Add("Column3", typeof(string));
table.Rows.Add("Entry1", "Entry2", "Entry3");
table.Rows.Add("Entry4", "Entry5", "Entry6");
table.Rows.Add("Entry7", "Entry8", "Entry9");
dataGrid.ItemsSource = table.DefaultView;
this does not work for me.
Best Regards,
Frank