Simple table (extension example)
The Simple table code example demonstrates a basic table.
Finding the code examples
In a Qlik Sense Desktop environment, you find the code examples in ...\Users\<UserName>\Documents\Qlik\Examples\Extensions.
In a Qlik Sense environment, you find the code examples in ...\ProgramData\Qlik\Examples\Extensions.
Full code example
Code example breakdown
-
Edit the applicable fields of the qext file to set a default title, description, icon and type.
-
Implement paint method.
-
Define properties. In this code example, properties are defined inside the main JavaScript file.
-
Add styling to separate CSS file:
It is good programming practice to keep your styling in a separate CSS file. Qlik Sense set the CSS class qv-object-[extension name] on your extensions. You should prefix your CSS rules with that. You then load your CSS file with requires and add its content to the HTML page:
define(["jquery", "text!./simpletable.css"], function($, cssContent) {'use strict'; $("<style>").html(cssContent).appendTo("head");
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!