| C1.Xaml.FlexGrid アセンブリ > C1.Xaml.FlexGrid 名前空間 > C1FlexGrid クラス : GroupRowPosition プロパティ |
'宣言 Public Property GroupRowPosition As GroupRowPosition
public GroupRowPosition GroupRowPosition {get; set;}
グループは、Windows.UI.Xaml.Data.ICollectionView インタフェースを実装するデータソースによって作成されます。
グループを作成するには、まず Windows.UI.Xaml.Data.ICollectionView を実装するデータソースオブジェクト(Silverlight の PagedCollectionView や WPF の ListCollectionView など)を作成し、次に C1.Xaml.PropertyGroupDescription オブジェクトをデータソースの ICollectionView.GroupDescriptions コレクションに追加します。
グループの定義を完了すると、データソースが自動的にグループを作成して維持し、C1FlexGrid に結果が表示されます。
// データソースとして使用される PagedCollectionView を作成します 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")); } // グリッドをデータソースに連結します _flex.ItemsSource = view; // グループ行をデータの上に表示します _flex.GroupRowPosition = GroupRowPosition.AboveData;
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