QTable

Note: STABLE.
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

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 information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?