ASP.NET MVC Controls
PropertyGroupDescription Class
File
wijmo.js
Module
wijmo.collections
Base Class
GroupDescription

Describes the grouping of items using a property name as the criterion.

For example, the code below causes a CollectionView to group items by the value of their 'country' property:

var cv = new wijmo.collections.CollectionView(items);
var gd = new wijmo.collections.PropertyGroupDescription('country');
cv.groupDescriptions.push(gd);

You may also specify a callback function that generates the group name. For example, the code below causes a CollectionView to group items by the first letter of the value of their 'country' property:

var cv = new wijmo.collections.CollectionView(items);
var gd = new wijmo.collections.PropertyGroupDescription('country', 
  function(item, propName) {
    return item[propName][0]; // return country's initial
});
cv.groupDescriptions.push(gd);

Constructor

Methods

Constructor

constructor

constructor(property: string, converter?: Function): PropertyGroupDescription

Initializes a new instance of the PropertyGroupDescription class.

Parameters
Returns
PropertyGroupDescription

Methods

groupNameFromItem

groupNameFromItem(item: any, level: number): any

Returns the group name for the given item.

Parameters
  • item: any

    The item to get group name for.

  • level: number

    The zero-based group level index.

Returns
any

namesMatch

namesMatch(groupName: any, itemName: any): boolean

Returns a value that indicates whether the group name and the item name match (which implies that the item belongs to the group).

Parameters
  • groupName: any

    The name of the group.

  • itemName: any

    The name of the item.

Returns
boolean

 

 


Copyright © GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback