ListView.ongroupheaderinvoked event

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

Synchronous No
Bubbles Yes
Cancelable Yes

 

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:

Property Meaning
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 WinJS version

WinJS 3.0

Namespace

WinJS.UI

See also

ListView

detail