ListView.ongroupheaderinvoked event

Applies to Windows and Windows Phone

Raised when the user taps or clicks a group header.

Syntax


<div 
    data-win-control="WinJS.UI.ListView" 
    data-win-options="{ongroupheaderinvoked : handler}">
</div>


function handler(eventInfo) { /* Your code */ }
 
// addEventListener syntax
listView.addEventListener("groupheaderinvoked", handler);
listView.removeEventListener("groupheaderinvoked", handler);


Event information

SynchronousNo
BubblesYes
CancelableYes

 

Event handler parameters

eventInfo

Type: CustomEvent

An object that contains info about the event. The detail property of this object contains the following sub-properties:

PropertyMeaning
detail.groupHeaderIndex

The index of the group header that raised the event.

detail.groupHeaderPromise

A Promise object that returns info about the group header.

 

Remarks

Note  When migrating an app from Windows Library for JavaScript 1.0 to Windows Library for JavaScript 2.0, your app must listen to the groupHeaderInvoked event. This allows the header to capture both keyboard and mouse events. Apps built on Windows Library for JavaScript 1.0 that relied on navigation through touch and mouse must move their handler code into this event.

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1

Namespace

WinJS.UI

Library

Ui.js

See also

ListView
detail

 

 

Show:
© 2014 Microsoft