Skip to main content Skip to complementary content

QTable

Information noteSTABLE.

This API is reliable and breaking changes are unlikely.

Class

QTable()

Wrapper around hypercube data from the Qlik associative engine. Notification is sent when data is available. To receive notification, bind a listener on OnData of the QTable instance.

Version history

Version history
Version state Details
Introduced 2.1

Properties

rows

Type: Array.QRow

Data rows.

headers

Type: Array.QHeader

Header information.

totals

Type: Array.QMeasureCell

Total information for measures.

rowCount

Type: Number

Total number of rows for the qHyperCube, including rows not fetched from the server.

colCount

Type: Number

Total number of columns for the qHyperCube.

Example

Initialization using the hypercube of the current visualization:

	 var table = qlik.table( this );

	 var listener = function() {
		var rowCount = table.rowCount;
		var colCount = table.colCount;
		table.OnData.unbind( listener );  //unregister the listener when no longer notification is needed.
	 };
	 table.OnData.bind( listener ); //bind the listener
Your main script, based on using AngularJS:

	if ( !this.$scope.table ) {
	this.$scope.table = qlik.table( this );
	}
In your AngularJS template:
	<tr ng-repeat="row in table.rows">
        	<td ng-repeat="cell in row.cells"> {{cell.qText}} </td>;
        </tr>

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!