Class Qww.Ctls.FlexiGrid.Mgr
JavaScript control to render the contents of a QlikView table in a flexible grid format where the developer
specifies JavaScript functions to run to render the different components. This also supports rendering the contents
of a listbox in the same way.
Defined in: <JavaScript\QWW\QwwJs_FlexiGridCtlMgr.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Constructs a new Qww.Ctls.FlexiGrid.Mgr instance.
|
| Field Attributes | Field Name and Description |
|---|---|
|
Reference to the configuration object which was used to create construct the object.
|
|
|
Returns the current page number which the TableMgr holds data for.
|
|
|
Reference to the ListBoxMgr instance being used to communication with the underlying listbox.
|
|
|
Number of rows in the current page of data (note that it may be less than the
PageSize if it's the last page of data).
|
|
|
Number of rows in the current page of data (note that it may be less than the PageSize if it's the last page of data).
|
|
|
Name of method to call to call page up function.
|
|
|
Number of rows per page of data received for the table.
|
|
|
Name of method to call to call page up function.
|
|
|
Name of method to call to call set page function.
|
|
|
Name of method to call to call set page function.
|
|
|
Reference to the TableMgr instance being used to communication with the underlying table.
|
|
|
Total number of rows in the table or listbox.
|
| Method Attributes | Method Name and Description |
|---|---|
|
PageDown()
Moves to the next page of data in the table/listbox.
|
|
|
PageUp()
Moves to the previous page of data in the table/listbox.
|
|
|
SelectSingleRecord(recordNumber)
Selects a single record in the flexi grid.
|
|
|
SetPage(pageNumber)
Moves to the page number specified.
|
Class Detail
Qww.Ctls.FlexiGrid.Mgr(cfg)
Constructs a new Qww.Ctls.FlexiGrid.Mgr instance.
- Parameters:
- {Object} cfg
- JSON object to configure Qww.Ctls.FlexiGrid.Mgr.
- {String} cfg.ObjectID
- Id of the table or listbox in the QlikView application.
- {Qww.QlikViewObjectType} cfg.SourceQlikviewObjectType Optional, Default: Qww.QlikViewObjectType.TableBox
- Type of object which flexi grid will render. If you specify Qww.QlikViewObjectType.TableBox.ListBox you can simulate columns of data by concatenating entries in the listbox using the '#' character.
- {String} cfg.ElementToShowResultsIn
- ID of html element to show results grid in.
- {Function} cfg.OnRenderRecord
- Function to call to render the current record, should take the following three parameters (flexiGrid, record, numberOfResults). Record will either be a Qww.Table.Row or a Qww.ListBox.Item depending on the cfg.SourceQlikviewObjectType setting. This function should return an object with EITHER a .Html property containing the html string to represent the record in the flexi grid or a .Element property containing a DOM element representing the record.
- {String} cfg.ElementToShowResultsSummaryIn Optional
- ID of html element to show results summary in.
- {String} cfg.ElementToShowSortControlIn Optional
- ID of html element to show sort control in.
- {String} cfg.ElementToShowPagingIn Optional
- ID of html element to show paging control in.
- {Int} cfg.TableSelectColumn Optional, Default: 0
- If a tabular control is used behind the flexigrid then this specifies which column is used for selections.
- {Int} cfg.NumberOfColumns Optional, Default: 5
- Number of columns for the flexi grid.
- {Int} cfg.NumberOfRows Optional, Default: 10
- Number of rows for the flexi grid.
- {Function} cfg.OnInitialised Optional
- Function to call after the control has been initialised. This should accept a single parameter (a reference to this control).
- {String} cfg.SortAscendingIcon Optional, Default: ../images/QvExFlexiGridCtl/SortAsc.png
- Path to sort ascending icon.
- {String} cfg.SortDescendingIcon Optional, Default: ../images/QvExFlexiGridCtl/SortDesc.png
- Path to sort ascending icon.
- {String} cfg.Theme Optional, Default: Default
- Theme to use (this string gets used in css class names, for example QwwJs_FlexiGridCtl-PagingLink-ThemeName).
- {String} cfg.UpdatingHtml Optional
- Html to show in the flexi grid whilst it is updating. This can be used, for example, to show an animated GIF during updates.
- {Function} cfg.OnRenderSummary Optional
- Function to call to render the summary string for the control. This should accept a single parameter (a reference to this control) and return an object with either a .Html property containing the html string to represent the summary or a .Element property containing a DOM element representing the summary.
- {Function} cfg.OnRenderPaging Optional
- Function to call to render the paging control. This should accept a single parameter (a reference to this control) and return an object with either a .Html property containing the html string to represent the paging control or a .Element property containing a DOM element representing the paging control.
- {Function} cfg.OnInitialised Optional
- Function to call when the control has been initialised.
- {Function} cfg.OnRenderBegin Optional
- Function to call when the control is about to re-render.
- {Function} cfg.OnRenderComplete Optional
- Function to call when the control is about to complete rendering.
- {String} cfg.ApplicationID Optional, Default: null
- Id/Name of the QlikView application. Note this is only necessary when multiple QlikView documents are being used on the same web page and should otherwise be set to null.
Field Detail
{Object}
Cfg
Reference to the configuration object which was used to create construct the object. This
allows certain properties to be updated after initial instantiation.
{Int}
CurrentPage
Returns the current page number which the TableMgr holds data for.
{Qww.ListBox.Mgr}
ListBoxMgr
Reference to the ListBoxMgr instance being used to communication with the underlying listbox.
Note that this will be null if the cfg.SourceQlikviewObjectType was NOT set to Qww.QlikViewObjectType.ListBox
when the control was constructed.
{Int}
NoRows
Number of rows in the current page of data (note that it may be less than the
PageSize if it's the last page of data).
{Int}
NumberOfPages
Number of rows in the current page of data (note that it may be less than the PageSize if it's the last page of data).
PageDownMethodAsString
Name of method to call to call page up function. Useful, for example, when contatenating html strings in OnRenderPaging if
returning a string rather than a DOM object.
var pageUpHtml = "<a href='#' onlclick='" +
flexiGrid.PageDownMethodAsString + "();" +
"'>Page Down</a>"
{Int}
PageSize
Number of rows per page of data received for the table. This will be the number of rows x number of columns in the flexi grid.
PageUpMethodAsString
Name of method to call to call page up function. Useful, for example, when contatenating html strings in OnRenderPaging if
returning a string rather than a DOM object.
var pageUpHtml = "<a href='#' onlclick='" +
flexiGrid.PageUpMethodAsString + "();" +
"'>Page Up</a>"
SelectSingleRecordMethodAsString
Name of method to call to call set page function. Useful, for example, when contatenating html strings in OnRenderRecord if
returning a string rather than a DOM object.
var selectRecordHtml = "<a href='#' onlclick='" +
flexiGrid.SelectSingleRecordMethodAsString + "(" + record.RecordNumber + " )" +
"'>Select</a>"
SetPageMethodAsString
Name of method to call to call set page function. Useful, for example, when contatenating html strings in OnRenderPaging if
returning a string rather than a DOM object.
var setFirstPageHtml = "<a href='#' onlclick='" +
flexiGrid.SetPageMethodAsString + "(1);" +
"'>First Page</a>"
{Qww.Table.Mgr}
TableMgr
Reference to the TableMgr instance being used to communication with the underlying table.
Note that this will be null if the cfg.SourceQlikviewObjectType was set to Qww.QlikViewObjectType.ListBox
when the control was constructed.
{Int}
TotalSize
Total number of rows in the table or listbox.
Method Detail
{Bool}
PageDown()
Moves to the next page of data in the table/listbox.
- Returns:
- {Bool} Returns true if the page was changed (if the table was already set to the last page then false will be returned).
{Bool}
PageUp()
Moves to the previous page of data in the table/listbox.
- Returns:
- {Bool} Returns true if the page was changed (if the table was already set to the first page then false will be returned).
SelectSingleRecord(recordNumber)
Selects a single record in the flexi grid. Note that if a table is being used as the underlying control
to provide the data then the column used for the selection will be that of the optional .TableSelectColumn specified on the configuration
object used to construct this control (which defaults to 0). If a ListBox is being used to provide the data then the argument should be
the value of the underlying item. Otherwise it should be the record number of the row in the table.
- Parameters:
- {Int} recordNumber
- Record number to select.
SetPage(pageNumber)
Moves to the page number specified. Note that the first page is 1.
- Parameters:
- {Int} pageNumber
- Page number to move to.
