Xceed DataGrid for Silverlight Documentation
GroupConfigurationSelector Property
Example 


Gets or sets a group-configuration selector that will be used to select the appropriate configuration for a group based on its content.
Syntax
'Declaration
 
Public Property GroupConfigurationSelector As DataGridGroupConfigurationSelector
'Usage
 
Dim instance As DataGridControl
Dim value As DataGridGroupConfigurationSelector
 
instance.GroupConfigurationSelector = value
 
value = instance.GroupConfigurationSelector
public DataGridGroupConfigurationSelector GroupConfigurationSelector {get; set;}

Property Value

A GroupConfigurationSelector that will be used to select the appropriate configuration for a group based on its content.
Remarks
Any modifications made to an active DataGridGroupConfigurationSelector (see DataGridControl.GroupConfigurationSelector property) or DataGridGroupConfiguration once the content of a grid is displayed requires a call to the Refresh method in order for the changes to be applied.
Example
The code for the AlternatingGroupLevelConfigurationSelector class can be found in the Additional Resources section of the documentation.
<!--The alternatingGroupLevelConfigurationSelector resource must be defined in the resources of the grid's
      parent container or higher.-->
<local:AlternatingGroupLevelConfigurationSelector x:Key="alternatingGroupLevelConfigurationSelector">
   <local:AlternatingGroupLevelConfigurationSelector.EvenGroupConfiguration>
      <sldg:DataGridGroupConfiguration>
         <sldg:DataGridGroupConfiguration.GroupContainerStyle>
            <Style TargetType="sldg:GroupContainer">
               <Setter Property="Background"
                       Value="DeepPink"/>
            </Style>
         </sldg:DataGridGroupConfiguration.GroupContainerStyle>
      </sldg:DataGridGroupConfiguration>
   </local:AlternatingGroupLevelConfigurationSelector.EvenGroupConfiguration>
   <local:AlternatingGroupLevelConfigurationSelector.OddGroupConfiguration>
      <sldg:DataGridGroupConfiguration>
         <sldg:DataGridGroupConfiguration.GroupContainerStyle>
            <Style TargetType="sldg:GroupContainer">
               <Setter Property="Background"
                       Value="Yellow"/>
            </Style>
         </sldg:DataGridGroupConfiguration.GroupContainerStyle>
      </sldg:DataGridGroupConfiguration>
   </local:AlternatingGroupLevelConfigurationSelector.OddGroupConfiguration>
</local:AlternatingGroupLevelConfigurationSelector>
 
<sldg:DataGridControl x:Name="sldgDataGridControl"
                      ItemsSource="{Binding Path=Orders}"
                      GroupConfigurationSelector="{StaticResource alternatingGroupLevelConfigurationSelector}">
   <sldg:DataGridControl.GroupDescriptions>
      <sldg:DataGridGroupDescription PropertyName="ShipCountry"/>
      <sldg:DataGridGroupDescription PropertyName="ShipCity" />
      <sldg:DataGridGroupDescription PropertyName="ShipVia" />
   </sldg:DataGridControl.GroupDescriptions>
</sldg:DataGridControl>
Requirements

Target Platforms: Windows 7, Windows Vista, Windows XP SP3, Windows Server 2008 family

See Also

Reference

DataGridControl Class
DataGridControl Members

Manipulating Data

Grouping Data

Send Feedback