This is a migrated thread and some comments may be shown as answers.

Column headers and data annotations

0 Answers 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
vk
Top achievements
Rank 1
vk asked on 01 Feb 2012, 03:18 PM

Hi,

I don't set headers for columns as they are getting filled through data annotation attributes and I concider this feature very convenient. But If I use a RadDataFilter and my GridView's IstemsSource is set to FilteredSource of the control, predefined grouped columns (ColumnGroupDescriptors) lost their display value. To solve this issue I have to set headers for these columns "manually".
Can this be fixed?

<telerik:RadDataFilter x:Name="shipmentsFilter" Source="{Binding Shipments}" />
 
<telerik:RadGridView x:Name="shipmentsGridView"
               ItemsSource="{Binding FilteredSource, ElementName=shipmentsFilter}">
   <telerik:RadGridView.Columns>
      <telerik:GridViewDataColumn UniqueName="departureDateColumn"
                         DataMemberBinding="{Binding Departed"/>
 
      <telerik:GridViewDataColumn UniqueName="shipmentNameColumn"
                         DataMemberBinding="{Binding ShipmentName}"/>
  </telerik:RadGridView.Columns>
 
  <telerik:RadGridView.GroupDescriptors>
     <telerik:ColumnGroupDescriptor Column="{Binding Columns[\departureDateColumn\], ElementName=shipmentsGridView}" SortDirection="Descending" />
  </telerik:RadGridView.GroupDescriptors>
 
</telerik:RadGridView>

Tags
GridView
Asked by
vk
Top achievements
Rank 1
Share this question
or