# Wijmo.Propertygroupdescription

## Content

<div class="content__tsd">
						<div style="display:flex;justify-content:space-between;align-items:center">
							<h1>
								PropertyGroupDescription Class
							</h1>
						</div>
						<section class="tsd-comment">
							<div class="tsd-comment">
								<div class="lead">
									<p>Describes the grouping of items using a property name as the criterion.</p>
								</div>
								<p>For example, the code below causes a <a href="wijmo.collectionview.html">CollectionView</a> to group items
								by the value of their 'country' property:</p>
								<pre>var cv = new wijmo.collections.CollectionView(items);
var gd = new wijmo.collections.PropertyGroupDescription('country');
cv.groupDescriptions.push(gd);
</pre>
								<p>You may also specify a callback function that generates the group name.
									For example, the code below causes a <a href="wijmo.collectionview.html">CollectionView</a> to group items
								by the first letter of the value of their 'country' property:</p>
								<pre>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);
</pre>
							</div>
						</section>
						<section class="tsd-hierarchy">
							<h3>Heirarchy</h3>
							<ul class="tsd-hierarchy">
								<li>
									<a href="wijmo.groupdescription.html" class="tsd-signature-type">GroupDescription</a>
									<ul class="tsd-hierarchy">
										<li>
											<span class="target">PropertyGroupDescription</span>
										</li>
									</ul>
								</li>
							</ul>
						</section>
						<section class="tsd-index-group">
							<section class="tsd-index-panel">
								<div class="tsd-index-content">
									<section class="tsd-index-section ">
										<div class="title">
											<div class="gc_api_tree-item_icon_img_wrapper">
												<div class="gc_api_tree-item_icon_img" data-expand="true">
												</div>
											</div>
											<h3>
												Constructors
											</h3>
										</div>
										<ul class="tsd-index-list">
											<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="wijmo.propertygroupdescription.html#constructor" class="tsd-kind-icon">constructor</a></li>
										</ul>
									</section>
									<section class="tsd-index-section ">
										<div class="title">
											<div class="gc_api_tree-item_icon_img_wrapper">
												<div class="gc_api_tree-item_icon_img" data-expand="true">
												</div>
											</div>
											<h3>
												Properties
											</h3>
										</div>
										<ul class="tsd-index-list">
											<li class="tsd-kind-property tsd-parent-kind-class"><a href="wijmo.propertygroupdescription.html#propertyname" class="tsd-kind-icon">property<wbr>Name</a></li>
										</ul>
									</section>
									<section class="tsd-index-section ">
										<div class="title">
											<div class="gc_api_tree-item_icon_img_wrapper">
												<div class="gc_api_tree-item_icon_img" data-expand="true">
												</div>
											</div>
											<h3>
												Methods
											</h3>
										</div>
										<ul class="tsd-index-list">
											<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="wijmo.propertygroupdescription.html#groupnamefromitem" class="tsd-kind-icon">group<wbr>Name<wbr>From<wbr>Item</a></li>
											<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="wijmo.propertygroupdescription.html#namesmatch" class="tsd-kind-icon">names<wbr>Match</a></li>
										</ul>
									</section>
								</div>
							</section>
						</section>
						<section class="tsd-panel-group tsd-member-group ">
							<h2>Constructors</h2>
							<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
								<a name="constructor" class="tsd-anchor"></a>
								<h3>constructor</h3>
								<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
									<li class="tsd-signature tsd-kind-icon">new <wbr>Property<wbr>Group<wbr>Description<span class="tsd-signature-symbol">(</span>property<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, converter<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">IGroupConverter</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="wijmo.propertygroupdescription.html" class="tsd-signature-type">PropertyGroupDescription</a></li>
								</ul>
								<ul class="tsd-descriptions">
									<li class="tsd-description">
										<aside class="tsd-sources">
										</aside>
										<div class="tsd-comment">
											<div class="lead">
												<p>Initializes a new instance of the <a href="wijmo.propertygroupdescription.html">PropertyGroupDescription</a> class.</p>
											</div>
										</div>
										<h4 class="tsd-parameters-title">Parameters</h4>
										<ul class="tsd-parameters">
											<li>
												<h5>property: <span class="tsd-signature-type">string</span></h5>
												<div class="tsd-comment">
													<div class="lead">
														<p>The name of the property that specifies
														which group an item belongs to.</p>
													</div>
												</div>
											</li>
											<li>
												<h5><span class="tsd-flag ts-flagOptional">Optional</span> converter: <span class="tsd-signature-type">IGroupConverter</span></h5>
												<div class="tsd-comment">
													<div class="lead">
														<p>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.</p>
													</div>
												</div>
											</li>
										</ul>
										<h4 class="tsd-returns-title">Returns <a href="wijmo.propertygroupdescription.html" class="tsd-signature-type">PropertyGroupDescription</a></h4>
									</li>
								</ul>
							</section>
						</section>
						<section class="tsd-panel-group tsd-member-group ">
							<h2>Properties</h2>
							<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
								<a name="propertyname" class="tsd-anchor"></a>
								<h3>propertyName</h3>
								<div class="tsd-signature tsd-kind-icon">property<wbr>Name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
								<aside class="tsd-sources">
								</aside>
								<div class="tsd-comment">
									<div class="lead">
										<p>Gets the name of the property that is used to determine which
										group an item belongs to.</p>
									</div>
								</div>
							</section>
						</section>
						<section class="tsd-panel-group tsd-member-group ">
							<h2>Methods</h2>
							<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
								<a name="groupnamefromitem" class="tsd-anchor"></a>
								<h3>groupNameFromItem</h3>
								<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
									<li class="tsd-signature tsd-kind-icon">group<wbr>Name<wbr>From<wbr>Item<span class="tsd-signature-symbol">(</span>item<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, level<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
								</ul>
								<ul class="tsd-descriptions">
									<li class="tsd-description">
										<aside class="tsd-sources">
											<p>Overrides <a href="wijmo.groupdescription.html">GroupDescription</a>.<a href="wijmo.groupdescription.html#groupnamefromitem">groupNameFromItem</a></p>
										</aside>
										<div class="tsd-comment">
											<div class="lead">
												<p>Returns the group name for the given item.</p>
											</div>
										</div>
										<h4 class="tsd-parameters-title">Parameters</h4>
										<ul class="tsd-parameters">
											<li>
												<h5>item: <span class="tsd-signature-type">any</span></h5>
												<div class="tsd-comment">
													<p>The item to get group name for.</p>
												</div>
											</li>
											<li>
												<h5>level: <span class="tsd-signature-type">number</span></h5>
												<div class="tsd-comment">
													<p>The zero-based group level index.</p>
												</div>
											</li>
										</ul>
										<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
										<p>The name of the group the item belongs to.</p>
									</li>
								</ul>
							</section>
							<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
								<a name="namesmatch" class="tsd-anchor"></a>
								<h3>namesMatch</h3>
								<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
									<li class="tsd-signature tsd-kind-icon">names<wbr>Match<span class="tsd-signature-symbol">(</span>groupName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, itemName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
								</ul>
								<ul class="tsd-descriptions">
									<li class="tsd-description">
										<aside class="tsd-sources">
											<p>Overrides <a href="wijmo.groupdescription.html">GroupDescription</a>.<a href="wijmo.groupdescription.html#namesmatch">namesMatch</a></p>
										</aside>
										<div class="tsd-comment">
											<div class="lead">
												<p>Returns a value that indicates whether the group name and the item name
												match (which implies that the item belongs to the group).</p>
											</div>
										</div>
										<h4 class="tsd-parameters-title">Parameters</h4>
										<ul class="tsd-parameters">
											<li>
												<h5>groupName: <span class="tsd-signature-type">any</span></h5>
												<div class="tsd-comment">
													<p>The name of the group.</p>
												</div>
											</li>
											<li>
												<h5>itemName: <span class="tsd-signature-type">any</span></h5>
												<div class="tsd-comment">
													<p>The name of the item.</p>
												</div>
											</li>
										</ul>
										<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
										<p>True if the names match; otherwise, false.</p>
									</li>
								</ul>
							</section>
						</section>
					</div>