Grids and gallery

reloadGridPanel(panelid, args)

where XXX is the grid identifier (CON12) - reload the content of the grid

var args = new Object();
args['INPUT_PARAM'] = 'EXAMPLE';

reloadGridPanel603(args);

reloadGalleryPanel(panelid, args)

where XXX is the galleryidentifier (CON12) - reload the content of the gallerypanel

var args = new Object();
args['INPUT_PARAM'] = 'EXAMPLE';

reloadGalleryPanel603(args);

setVisibleColumn(attr,visible)

Set the visibility state for a column in grid; the column isidentified by the attribute name. The second argument can have the values "Y" or "N", used to set the visibility. This method can be invoked only before showing the grid, so it should be used within a js action binded to a "before rendering grid" event.

setVisibleColumn("columnName","Y");
or
setVisibleColumn("columnName","N");

getPanelParameter(name)

Get a parameter value passed to the current panel (trough the window args variable). Required parameters are:

Example

//From the window "A" I open the window "B"

//Window A
var args = {
    param1: "MyCustomParam"
};

//...
//Window B
getPanelParameter('param1');   //Output: "MyCustomParam"

setPanelOptionalParameter(panelid, parName, value)

Set the optional parameter for panel grid or detail

Required arguments:

getPanelOptionalParameter(panelid, parName)

Return the value of optional parameter of panel grid or detail ()

Required arguments:

setCustomColumnHeader(attributeName, header)

Set the header of attribute name column for current grid(action must be executed BEFORE RENDER) Required arguments:

scrollPanelTo(panelid, x, y)

where XXX is the panel identifier (CON12), if the panel is scrollable scroll (ex. web preview o grid) the panel to the x and y position specified.

NB: not works for gallery

scrollPanelTo559(0, 0); //scroll panel to top

setGridNoDataMessage(panelid, message)

Set the text message of the grids without data.

Example:

setGridNoDataMessage(123, "No data found");

enableGridMultiselectionMode(panelid, enable)

Enable o disable the multi-selection mode in a grid.

selectAllGridRows(panelid)

If you have enabled the multi-select mode in a grid, select all visible rows in that grid.

Note: if you have activated the lazy loading only the load rows are selected, in this case you should manage multiple selection differently.

deselectAllGridRows(panelid)

If you have enabled the multi-select mode in a grid, deselect all visible rows in that grid.

getGridSelectedRows(panelid)

If you have enabled the multi-select mode in a grid, return the selected rows vo.

Example:

var json = getGridSelectedRows(123);
var selectedRows = JSON.parse(json);
for(var i=0; i<selectedRows.length; i++)
{
    logger("sample: "+selectedRows[i].MY_FIELD);
}

setGridReloadPosition(panelid, position)

Set grid option to scroll rows on TOP or BOTTOM after data reload.

Example:

setGridReloadPosition(123, "BOTTOM");

setGridRow(panelid, position, rowVo, selected)

Refresh the row at the given position with the passed vo, then force the render to be reload only for that position.

N.B. use this function for refresh ONLY ONE ROW, if you need to refresh more row use the setGridRows function

Example:

var voNew = {
    selected : 'Y'
    description : 'Gino' 
}
var position = 0, //0 to length - 1

setGridRow(123, position, voNew);

setGridRows(panelid, rowsVo)

Set the passed row to the grid and force the render to be refresh only for the given rows.

Example:

var updateRows = [];

updateRows.push({
    position : 2, //0 to length - 1
    vo : voNew //the single row vo
})
setGridRows(89, updateRows);

selectGridRow(panelid, position, select)

Select or deselect the passed row in a grid if the grid is in multi-selection mode.

selectGridRows(panelid, positions, select)

Select or deselect the passed row in a grid if the grid is in multi-selection mode.

refreshGrid(panelid)

Since 6.0.2 version

Invalidate the grid rows and redraw it without execute query. This function force the cell renders and not change the scrollview position.

Last updated