I set the datasource for a WPF dxg:GridControl
to that of a hard coded list.
gridControl1.ItemsSource = new List<Entity> { new Entity() { Name = "1" }, new Entity() { Name = "2" }, new Entity() { Name = "3" } };
I have to specify each column in the XAML:
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="Name" Name="gridColumn1" />
<dxg:GridColumn FieldName="Column2" Name="gridColumn2" />
</dxg:GridControl.Columns>
How can I get the columns to autogenerate instead of specifying XAML?
I tried removing the columns. That displayed nothing. The data actually comes from a WCF service at runtime, so the "Populate Columns" button in design mode is probably not going to work either.