FlexGrid for WinRT
GroupRowPosition Property
Example 

Gets or sets a value that indicates where group rows should be displayed with respect to the data.
Syntax
'Declaration
 
Public Property GroupRowPosition As GroupRowPosition
public GroupRowPosition GroupRowPosition {get; set;}
Remarks

Groups are created by data sources that implement the Windows.UI.Xaml.Data.ICollectionView interface.

To create groups, start by creating a data source object that implements Windows.UI.Xaml.Data.ICollectionView (such as PagedCollectionView in Silverlight or ListCollectionView in WPF), then add C1.Xaml.PropertyGroupDescription objects to the data source's ICollectionView.GroupDescriptions collection.

Once the groups have been defined, the data source will automatically create and maintain them, and the C1FlexGrid will display the results.

Example
The code below creates a data source with grouping and binds it to a C1FlexGrid.
// create PagedCollectionView used as a data source 
var data = new ObservableCollection<Customer>();
for (int i = 0; i < 10; i++)
{
  data.Add(new Customer(i));
}
var view = new PagedCollectionView(data);
using (view.DeferRefresh())
{
    view.GroupDescriptions.Clear();
    view.GroupDescriptions.Add(new PropertyGroupDescription("Country"));
    view.GroupDescriptions.Add(new PropertyGroupDescription("Active"));
}
            
// bind grid to data source 
_flex.ItemsSource = view;
            
// show group rows above the data
_flex.GroupRowPosition = GroupRowPosition.AboveData;
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

C1FlexGrid Class
C1FlexGrid Members

 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum  |   Documentation Feedback