Abstract
Optional
tableReturns a cell of the table for a specific table record. May be necessary to access elements within a table and within a data record. If you now have a control, you can use other methods on it, e.g. getValue, getRecord and others. See also Cell.
Works only in a free layout table.
// Get table
var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
// Get all columns
var cols = tableCtrl.getCols();
// Get cell value in first column and first row
tableCtrl.getCell(cols[0].controls[0].getHtml());
// Get cell value in third column and second row
tableCtrl.getCell(cols[2].controls[1].getHtml());
Retrieves a column using its GUID. To determine the GUID of a column, you can use getCols.
Free layout tables don't have real columns because they repeat a whole Intrexx page for each data record. Therefor they return Intrexx controls just like Text, Button, Image, Checkbox, Email and so on.
The unique identifier (GUID) of the column to be retrieved.
The column from the table that matches the column GUID.
// Get table
var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
// Get column
var col = tableCtrl.getCol("<COLUMN-GUID>");
console.log(col);
Retrieves all columns from the table.
View tables columns are the Intrexx controls, e.g. a table with two columns first column shows a title with the Text control and the second is an image Button control.
Month | Action |
---|---|
January | Button |
February | Button |
March | Button |
Free layout tables don't have real columns because they repeat a whole Intrexx page for each data record. Therefor they return Intrexx controls just like Text, Button, Image, Checkbox, Email and so on for each data record.
Important: In a free layout table the controls have dynamic unique IDs, so they will change with every page reload!
An array of table columns.
// Get table
var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
// Get columns
var cols = tableCtrl.getCols();
console.log(cols);
Returns a list with all records of the current table page.
// Get rows
var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
// Iterate over each row to change their background color
var rows = tableCtrl.getRows()
rows.forEach((row) => row.getHtml()[0].style.backgroundColor = "blue");
Asynchronous reload of a table.
Optional
settings: TableReloadSettings// Get table
var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
// Reload table with settings
tableCtrl.reload({
bAsync: true,
bAddHistory: true,
bWaitAnimation: false,
oRequestMap: {
rq_company: 'INTREXX',
rq_city: 'Freiburg'
}
});
// Get table
var tableCtrl = ix.api.dom.getControl("<TABLE-GUID>");
// Reload table
$.when(tableCtrl.reload())
.then(function() {
alert("done");
})
.fail(function() {
alert("failed");
});
Provides several generic methods for Intrexx tables that can be used within both a view table and a free layout table.
Example