Column headers and data annotations

1 posts, 0 answers
  1. vk
    vk avatar
    46 posts
    Member since:
    Jul 2012

    Posted 01 Feb 2012 Link to this post

    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>

Back to Top