Is there a way to view the column headers for a XamDataGrid at design-time? Here is the xaml:
<igDP:XamDataGrid x:Name="gridCustomer" BindToSampleData="False" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Width="750" Height="250" GroupByAreaLocation="None" > <igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings ExpansionIndicatorDisplayMode="Never" AutoGenerateFields="False" RecordSelectorLocation="None" SelectionTypeRecord="Single" SelectionTypeCell="None" SelectionTypeField="None" /> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings AllowEdit="False" AllowGroupBy="False" AllowSummaries="False" AllowResize="False" CellClickAction="SelectRecord" /> </igDP:XamDataGrid.FieldSettings> <igDP:XamDataGrid.ViewSettings> <igDP:GridViewSettings /> </igDP:XamDataGrid.ViewSettings> <igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout> <igDP:FieldLayout.FieldSettings> <igDP:FieldSettings CellClickAction="SelectRecord" /> </igDP:FieldLayout.FieldSettings> <igDP:FieldLayout.Fields> <igDP:Field Name="CustomerID" Label="Cust #" /> <igDP:Field Name="CustomerName" Label="Name" /> <igDP:Field Name="Address" Label="Address"/> <igDP:Field Name="ContactPhone" Label="Phone"/> </igDP:FieldLayout.Fields> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts> </igDP:XamDataGrid>
In fact the only way to even see the column headers once I run the app is to bind the grid to an empty list of type Customer. Am I missing something?
Thanks - I wasn't aware the XamGrid was available in wpf. I had been working exclusively in Silverlight for the last couple years.
Hello,
Thank you for your post. When the ‘DataSource’ of the XamDataGrid is not bound to any data, the labels(headers) of the fields are not shown at design time. This is the default behavior, even if you declare a field layout manually. Our XamGrid control shows the headers of its column at design time, even if its ‘ItemsSource’ is not bound to any data.
If you need any further assistance on this matter, feel free to ask.