Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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

WinJS 3.0

Namespace

WinJS.UI

See also

ListView
detail

 

 

Show: