constructor(property: string, converter?: IGroupConverter): PropertyGroupDescription
PropertyGroupDescriptionクラスの新しいインスタンスを初期化します。
The name of the property that specifies which group an item belongs to.
A callback function that takes an item and a property name and returns the group name. If not specified, the group name is the property value for the item.
プロパティ名を基準として項目のグループ化を記述します。
たとえば、以下のコードはCollectionView の項目を項目の'country'プロパティの値に従ってグループ化します。
var cv = new wijmo.collections.CollectionView(items); var gd = new wijmo.collections.PropertyGroupDescription('country'); cv.groupDescriptions.push(gd);また、グループ名を生成するコールバック関数を指定することもできます。たとえば、以下のコードはCollectionView の項目を項目の'country'プロパティの値の最初の文字に従ってグループ化します。
var cv = new wijmo.collections.CollectionView(items); var gd = new wijmo.collections.PropertyGroupDescription('country', function(item, propName) { return item[propName][0]; // 国の頭文字を返します。 }); cv.groupDescriptions.push(gd);