Class Index | File Index

Classes


Class SweetDevRia.Grid


Extends RiaComponent, RiaComponent.

Defined in: Grid.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
This is the Grid component class
Field Summary
Field Attributes Field Name and Description
<static>  
SweetDevRia.Grid.ADD_ROW_EVENT
This event type is fired when add a row
<static>  
SweetDevRia.Grid.CELL_SELECTION
This constant indicate that the user can select only one cell at once.
<static>  
SweetDevRia.Grid.CELLS_SELECTION
This constant indicate that the user can select many cells.
<static>  
SweetDevRia.Grid.CHANGE_PAGE_EVENT
This event type is fired when change the page
<static>  
SweetDevRia.Grid.CHECK_ROW_EVENT
This event type is fired when check a row
<static>  
SweetDevRia.Grid.DELETE_ROW_EVENT
This event type is fired when delete a row
 
Ids
<static>  
SweetDevRia.Grid.HIDE_COL_EVENT
This event type is fired when hide a column
<static>  
SweetDevRia.Grid.MODEL_EXPORT
This constant indicate that the excel export will contain all data included in server model.
<static>  
SweetDevRia.Grid.MOVE_COL_EVENT
This event type is fired when move a column
<static>  
SweetDevRia.Grid.NO_SELECTION
This constant indicate that no selection is possible in this table.
 
Set the name of the javascript function to be called when the user add a row.
 
Set the name of the javascript function to be called when the user change page.
 
Set the name of the javascript function to be called when a datagrid row is checked.
 
Set the name of the javascript function to be called when the user delete a row.
 
Set the name of the javascript function to be called when a datagrid column is hide.
 
Set the name of the javascript function to be called when a datagrid column is moved.
 
Set the name of the javascript function to be called when a datagrid is resized.
 
Set the name of the javascript function to be called when a datagrid cell is selected.
 
Set the name of the javascript function to be called when a datagrid row is selected.
 
Set the name of the javascript function to be called when the datagrid data are modifed.
 
Set the name of the javascript function to be called when a datagrid column is showed.
 
Set the name of the javascript function to be called when a datagrid column is sorted.
 
Set the name of the javascript function to be called when a datagrid row is unchecked.
 
Set the name of the javascript function to be called when a datagrid cell is unselected.
 
Set the name of the javascript function to be called when a datagrid row is unselected.
 
Set the name of the javascript function to be called when the user update a cell.
<static>  
SweetDevRia.Grid.REFRESH_GRID_EVENT
This event type is fired when refreshing the whole grid
<static>  
SweetDevRia.Grid.RESIZE_EVENT
This event type is fired when resize the grid
<static>  
SweetDevRia.Grid.ROW_SELECTION
This constant indicate that the user can select only one row at once.
<static>  
SweetDevRia.Grid.ROW_SELECTOR_CHECKBOX
This constant indicate that row selector is checkbox SWTRIA-1305
<static>  
SweetDevRia.Grid.ROW_SELECTOR_RADIO
This constant indicate that row selector is radio button SWTRIA-1305
<static>  
SweetDevRia.Grid.ROWS_SELECTION
This constant indicate that the user can select many rows.
<static>  
SweetDevRia.Grid.SELECT_CELL_EVENT
This event type is fired when select a cell
<static>  
SweetDevRia.Grid.SELECT_ROW_EVENT
This event type is fired when select a row
<static>  
SweetDevRia.Grid.SET_DATA_EVENT
This event type is fired when set the data
<static>  
SweetDevRia.Grid.SHOW_COL_EVENT
This event type is fired when show a column
<static>  
SweetDevRia.Grid.SORT_EVENT
This event type is fired when sort a column
 
accessors
 
Test d'une page barre avec select des pages, nombre total de page, select de nombre de ligne par page SWTRIA-1306
<static>  
SweetDevRia.Grid.UNCHECK_ROW_EVENT
This event type is fired when uncheck a row
<static>  
SweetDevRia.Grid.UNSELECT_CELL_EVENT
This event type is fired when unselect a cell
<static>  
SweetDevRia.Grid.UNSELECT_ROW_EVENT
This event type is fired when unselect a row
<static>  
SweetDevRia.Grid.UPDATE_CELL_EVENT
This event type is fired when upodate a cell
<static>  
SweetDevRia.Grid.WYSIWYG_EXPORT
This constant indicate that the excel export will contain data like display at the screen (hidden columns, order, etc.
Method Summary
Method Attributes Method Name and Description
<private>  
addCellSelection(rowId, columnId, test)
Select a cell
 
addColumn(id, header, size, ascendant, visible, resizable, sortable, hideable, editable, editable)
Add a new column in the datagrid.
 
addGroup(groupId, groupLabel, childrenIds)
Cree un nouveau group et y ajoute des ss group ou des ss colonnes
 
Add an item to the context menu
<private>  
addRowSelection(rowId, test)
Select a row
 
afterAddColumn(id, header, size, ascendant, visible, resizable, sortable, hideable, editable)
This method is called after Add a new column in the datagrid.
 
This method is called after changing the number of item displayed per page To be overridden !!
 
This method is called after Clear all table selection To be overridden !!
 
afterExcelExport(exportMode, exportdRowIds, exportId)
This method is called after Excel Export of rows To be overridden !!
 
afterGoToPage(actualPage)
This method is called after Change the displayed page into table pagination To be overridden !!
 
afterGroupingBy(grouping)
This method is called after Execute a multiple column sort To be overridden !!
 
This method is called after Initialize the Grid.
 
This method is called after Execute a multiple column sort To be overridden !!
 
This method is called after refreshing the grid To be overridden !!
 
This method is called after the complete drag of the Grid To be overridden !!
 
afterSetCellSelection(rowId, columnId, select)
This method is called after Set a cell selection To be overridden !!
 
afterSetCheckbox(rowId, select, testAll)
This method is called after setting the check status of a row.
 
This method is called after Check or uncheck the html checkbox component which check all checkboxes To be overridden !!
 
afterSetColumnPosition(colId, position)
This method is called after Set a column position To be overridden !!
 
afterSetColumnResizable(colId, resizable)
This method is called after Set the resizable column property To be overridden !!
 
afterSetColumnSize(colId, size)
This method is called after Set a colum width To be overridden !!
 
afterSetColumnSortable(colId, sortable)
This method is called after Set the sortable column property, This property indicate if the user can sort this column or not To be overridden !!
 
afterSetColumnVisibility(colId, visibility)
This method is called after Set the column visiblity
 
This method is called after Set the table data
 
This method is called after Set the draggableColumns property.
 
This method is called after Set the table height To be overridden !!
 
afterSetResizable(resizable)
This method is called after Set the resizable property.
 
afterSetRowSelection(rowId, select)
This method is called after Set a row selection To be overridden !!
 
This method is called after Set the selection mode of the table To be overridden !!
 
This method is called after Set the table size To be overridden !!
 
This method is called after Set the table cells tooltips
 
This method is called after Set the total data number of the table To be overridden !!
 
This method is called after Set the table width To be overridden !!
 
This method is called after showing the grid properties window To be overridden !!
 
afterSortColumn(colId, ascendant)
This method is called after Sort a column To be overridden !!
 
beforeAddColumn(id, header, size, ascendant, visible, resizable, sortable, hideable, editable)
This method is called before Add a new column in the datagrid.
 
This method is called before changing the number of item displayed per page To be overridden !!
 
This method is called before Clear all table selection To be overridden !!
 
beforeExcelExport(exportMode, exportdRowIds, exportId)
This method is called before Excel Export of rows To be overridden !!
 
beforeGoToPage(actualPage)
This method is called before Change the displayed page into table pagination To be overridden !!
 
beforeGroupingBy(grouping)
This method is called before Execute a multiple column sort To be overridden !!
 
This method is called before Initialize the Grid.
 
This method is called before Execute a multiple column sort To be overridden !!
 
This method is called before refreshing the grid To be overridden !!
 
This method is called after the complete drag of the Grid To be overridden !!
 
beforeSetCellSelection(rowId, columnId, select)
This method is called before Set a cell selection To be overridden !!
 
beforeSetCheckbox(rowId, select, testAll)
This method is called before setting the check status of a row.
 
This method is called before Check or uncheck the html checkbox component which check all checkboxes To be overridden !!
 
beforeSetColumnPosition(colId, position)
This method is called before Set a column position To be overridden !!
 
beforeSetColumnResizable(colId, resizable)
This method is called before Set the resizable column property To be overridden !!
 
beforeSetColumnSize(colId, size)
This method is called before Set a colum width To be overridden !!
 
beforeSetColumnSortable(colId, sortable)
This method is called before Set the sortable column property, This property indicate if the user can sort this column or not To be overridden !!
 
beforeSetColumnVisibility(colId, visibility)
This method is called before Set the column visiblity To be overridden !!
 
This method is called before Set the table data To be overridden !!
 
This method is called before Set the draggableColumns property.
 
This method is called before Set the table height To be overridden !!
 
beforeSetResizable(resizable)
This method is called before Set the resizable property.
 
beforeSetRowSelection(rowId, select)
This method is called before Set a row selection To be overridden !!
 
This method is called before Set the selection mode of the table To be overridden !!
 
beforeSetSize(width, height)
This method is called before Set the table size To be overridden !!
 
This method is called before Set the table cells tooltips To be overridden !!
 
This method is called before Set the total data number of the table To be overridden !!
 
This method is called before Set the table width To be overridden !!
 
This method is called before showing the grid properties window To be overridden !!
 
beforeSortColumn(colId, ascendant)
This method is called before Sort a column To be overridden !!
<private>  
blocDescrIndexOf(blocDescr, name)
Return the position of one bloc with this name
<private>  
Action triggered on the grid properties through the window
<private>  
Call the excel export
 
Generate an axport to excel format.
<private>  
Call the Multiple Column Sort method with parameters of the multiple column sort Window
<private>  
Call the Multiple Column Sort method with parameters of the multiple column sort Window
 
Change the number of item displayed per page
 
Check all checkboxes asscoiated with all selected rows.
 
Clear all table selection
<private>  
colHasParent(group)
Return if the column has a parent group
 
Return true if the table contains some data TT 458
 
Fonctions utilitaires de sizing des colonnes **
<private>  
Create the context menu.
<private>  
Create the excel Window
<private>  
Create the grid properties window, and the list inside
<private>  
Create the grouping Window
 
Create the structure for the grouping column header functionnality like this following example indexEmptyCol = [ [null, "G1", "G1", "G1", null, "G2", "G3, "G3", "G3"], [null, 3 , 3 , 3 , null, "GG1", "GG1", "GG1", "GG1"] ]
<private>  
createOrUpdatePageBar(pageBarId, isTop)
<private>  
createPageBar(pageBarId, isTop)
Create the pagination bar.
<private>  
Create the multiple column sort Window
<private>  
Create a new spliter used to resize columns
<private>  
deletePageBar(pageBarId)
Hide the pagination bar.
<private>  
dropColumn(table)
This method is called when the user drop a column
<private>  
dropDataColumn(id, nodeId, separatorId, targetId, isLast)
This method drop all datafrom a column position to another one
 
excelExport(exportMode, exportdRowIds, exportId)
Excel Export of rows
<private>  
generateButtonbar(text, isTop)
Generate the HTML source for buttonbar SWTRIA-1303
<private> <static>  
SweetDevRia.Grid.generateContextMenu(e, id)
Initialize the Grid contextual menu on the first right click.
<private>  
Generate the HTML source for buttonsbar SWTRIA-1303
<private>  
generateToolbar(text, isTop)
Generate the HTML source for whole toolbar (buttons bar and page bar) SWTRIA-1303
 
getBlocHeaderHtml(blocDescr)
Return the html text writted in the grouping rows header To be overridden !!
<private>  
Return the body height
 
Return the table bottom bar height
<private>  
Find this cellIndex from the column position
<private>  
Find this cellIndex from the column
<private>  
SWTRIA-1348 Nouvelle methode de calcul de la taille de grid (sans parcourir toutes les colonnes)
 
getCheckbox(rowId)
Return the value of the html checkbox component associated with one row
 
Return the value of the html checkbox component which check all checkboxes
 
Return the checked rows identifiants.
 
getColumn(colId)
Return the column
 
Return the column from its position
 
Return the column id from its position
 
Retourne index de la colonne en fonction de sa position
 
Return the total number of columns
 
Return the column position
 
Return the column size
 
Return the column visibility
<private>  
Find the column from this cellIndex
<private>  
Return the html string representing the data zone
 
Return the displayCheckbox property
<private>  
getDisplayedCellValue(rowId, columnId, cellValue)
 
Indicate if the user can drag columns or not
<private>  
Return the first column
<private>  
Return the first row (tr tag), not grouping header
<private>  
Return the first visible column
 
Return the first visible index in the data
<private>  
Return the first visible row (tr tag), not grouping header
 
Return the table size
 
getGroup(groupId)
Retourne un group ou une colonne a partir de son identifiant
<private>  
Return the header from a x position.
<private>  
Return the header text of the column.
 
Return the table height
<private>  
Return the header height
<private>  
Return the default row height
<private>  
Return the last column
<private>  
Return the last visible column
 
Return the last visible index in the data
<private>  
Return the last visible row (tr tag), not grouping header or detail
<private>  
Compute maximum height of the grid
<private>  
Compute maximum width of the grid
 
Return the minimum column width
<private>  
Compute minimum height of the grid
<private>  
Compute minimum width of the grid
<private>  
return the next cell of html table
<private>  
getNextCellSelection(lastSelection, evt, swapRow)
Find the next selection with a keycode (left, up, rigth, bottom arrow) from a selection.
<private>  
Return the next column of this Grid.
<private>  
getNextEditableCell(lastSelection, evt, swapRow)
<private>  
getNextRowSelection(lastSelection, evt)
Find the next selection with a keycode (left, up, rigth, bottom arrow) from a selection.
<private>  
Return the next visible column of this Grid.
<private>  
getNextVisibleRow(rows, rowIndex)
Return the next visible row, not detail or grouping header
<private>  
Return the pagination bar height
<private>  
return the previous cell of html table
<private>  
Return the previous column of this Grid.
<private>  
Return the previous visible column of this Grid.
<private>  
getPreviousVisibleRow(rows, rowIndex)
Return the previous visible row, not detail or grouping header
<private>  
Find the previous visible spliter
 
Indicate if the table is resizable or not.
<private>  
getRowBlocStr(blocDescrIndex)
Return the html string representing a row group
 
getRowData(rowId)
return the row data contained in the grid for a specific rowId
<private>  
getRowIdByIndex(rowIndex)
return the row identifiant of the row at the rowIndex position
<private>  
getRowIndex(rows, rowIndex)
Get the real row index from the visible row index
<private>  
getRowsForBloc(blocDescrIndex)
Return all rows of this bloc
 
Return the table selection
 
Return the selection mode of the table
 
Get height of toolbars around the table
 
Return the total data number of the table
 
Return the visible column by this position, ex : the third visible column is .
 
Return the number of visible columns
 
Return the visible index of this column.
 
Return the displayed rows number
 
Return the table width
 
goToPage(actualPage)
Change the displayed page into table pagination
 
groupingBy(grouping)
Execute a multiple column sort
<private>  
Handle key events to modify selection
<private>  
hidePageBar(pageBarId)
Turn bar visibility off pageBarId id of the page bgar (top or bottom).
 
incrDepth(groupId, depth)
On incremente de maniere recursive la propriete& depth des fils de ce group ou colonne
<private>  
initGroupingData(dataGrp, tab, tabAll)
Process grouping data to save in groupingDataDescr property
<private>  
Initialize the Grid.
 
Test if a cell or a row is selected or not
<private>  
Manage the key selection (simple or multiple)
 
Load data rows of the current page into the table
 
multipleColumnSort(columnsOrder)
Execute a multiple column sort
<private>  
onDragColumn(table)
This method put the dragdrop arrow at the good place according to header drag position.
<private>  
This method is called on server grouping callback
<private>  
onPagin(evt)
This method is called on server pagination callback
 
onPropertiesCheck(evt, params)
Action executer qd on clique sur l une des checkbox de visibilite de la fenetre de properties de la grid.
<private>  
onSelectCellEvt(mouse, rowId, columnId)
Method is called when the user click on a cell.
<private>  
onSort(evt)
This method is called on server sort callback
 
Refresh the table content.
<private>  
Refresh all checbox state.
<private>  
Refresh all columns visibilities.
<private>  
Refresh all selection.
<private>  
removeCellSelection(rowId, columnId)
Unselect a cell
<private>  
Unselect a row
<private>  
renameSeparator(colBeforeId, colId)
Rename a spliter.
<private>  
Reset All header column style
<private>  
Reset spliters constraints
 
Select all rows or cells if multiple selection is ok.
 
selectCellBloc(cellIds1, cellIds2, select)
Allow you to select a cells bloc in one shot ! that's select all cell between cell1 and cell2.
 
selectRowBloc(rowId1, rowId2, select)
Allow you to select a rows bloc in one shot ! that's select all rows between row1 and row2.
 
setCellSelection(rowId, columnId, select)
Set a cell selection
 
setCheckbox(rowId, select, testAll)
Check or uncheck the html checkbox component associated with one row
 
Check or uncheck the html checkbox component which check all checkboxes
<private>  
setColumnElementsVisibility(colId, visibility)
Set all column elements visiblity
 
setColumnPosition(colId, position)
Set a column position
 
setColumnResizable(colId, resizable)
Set the resizable column property
 
setColumnSize(colId, size, true)
Set a column width
 
setColumnSortable(colId, sortable)
Set the sortable column property, This property indicate if the user can sort this column or not
<private>  
setColumnSortClass(colId, ascendant, mouseover)
Refresh the header column style
 
setColumnVisibility(colId, visibility)
Set the column visibility
 
setConstraintId(constraintId)
Set the constraintId.
 
setData(data)
Set the table data
 
setDisplayCheckbox(displayCheckbox)
Set the displayCheckbox property
 
Set the draggableColumns property.
<private>  
setElementVisibility(elem, visibility, size)
Set an element visiblity
 
setGroupBy(groupBy)
Define grouping columns ids
 
setHeight(height)
Set the table height
<private>  
setHeightHeader(heightHeader)
Set the header height
 
Fixe la hauteur de la grid et du bodyDiv en fonction de la taille reelle du bodyDiv
<private>  
setHeightRow(heightRow)
Set the default row
 
setMaxHeight(maxHeight)
Set the new max height constraint for the resize
 
setMaxWidth(maxWidth)
Set the new max width constraint for the resize
 
setMinColumnWidth(minColumnWidth)
Set the minimum column width
 
Set the table data
 
setMinWidth(minWidth)
Set the new min minWidth constraint for the resize
<static>  
SweetDevRia.Grid.setPropertiesCheck(check, checked)
set visibility of a checkbox into the property window
 
setResizable(resizable)
Set the resizable property.
<private>  
setRowPerPage(rowPerPage)
Set the row number per page
 
setRowSelection(rowId, select)
Set a row selection
 
Set the selection mode of the table
 
setSize(width, height)
Set the table size
 
setTooltips(tooltips)
Set the cells tooltips
 
Set the total data number of the table
 
setWidth(width)
Set the table width
 
shiftColumnsHeader(the, the, isLastPosition)
Shift the columns headers in the table
 
shiftColumnsHeaderWidth(the, the, isLastPosition, wasLastPosition)
Shift the columns headers width in the table colgroup
 
Shift the column data in the columnsAtPosition list
<private>  
Show the Excel Window
 
Show the Grid Properties Window
<private>  
Show the grouping Window
<private>  
showPageBar(pageBarId)
Turn bar visibility on pageBarId id of the page bgar (top or bottom).
<private>  
Show the multiple column sort Window
 
sortColumn(colId, ascendant)
Sort a column
 
Swap the column visibility.
<private>  
swapRowBloc(blocDescrIndex)
Swap the visibility of a grouping row bloc
<private>  
Switch bar visibility pageBarId id of the page bgar (top or bottom).
<private>  
Change le mode wrap / nowrap (passage a la ligne) du contenu des cellules d'une ligne SWTRIA-1315
<private>  
Synchronize the scroll position between header and body.
<private>  
Synchronize table scrollers to follow the selection
<private>  
Test an element visiblity
<private>  
Test the header visiblity
 
testIfScrollBarNeeded(isRootNodeOpen)
SWTRIA-1335 Permet d'afficher ou non la barre de scrolling de facon automatique en fonction des cas
<private>  
SWTRIA-1306 Permet d'afficher ou non la barre de pagination du haut de facon automatique
<private>  
updateCell(rowId, columnId, cellValue)
 
updateColumnHeaderSize(column, newSize)
Met a jour le header d'une colonne � la taille donnee, ou a la taille theorique de la colonne si newSize n'est pas defini
 
Met a jour la largeur group headers.
 
Fait apparaitre/disapraitre le dissimulateur place en haut a droite de la grid en fonction de l'apparition/disparition de la barre de scroll verticale.
 
updateLastColumnSize(diff, headerDone)
Met a jour la taille du header et des cellules de la derniere colonne en lui ajoutant la valeur de diff qui peut etre negative
 
Met a jour la taille des cellules de la derniere colonne pour qu'elle corresponde a la taille actuelle du header
 
Send all client grid information to the server to update the server model.
<private>  
Return the html string representing the grouping head zone
Class Detail
SweetDevRia.Grid(id)
This is the Grid component class
Parameters:
{String} id
Id of this table
Field Detail
<static> SweetDevRia.Grid.ADD_ROW_EVENT
This event type is fired when add a row

<static> {int} SweetDevRia.Grid.CELL_SELECTION
This constant indicate that the user can select only one cell at once.

<static> {int} SweetDevRia.Grid.CELLS_SELECTION
This constant indicate that the user can select many cells.

<static> SweetDevRia.Grid.CHANGE_PAGE_EVENT
This event type is fired when change the page

<static> SweetDevRia.Grid.CHECK_ROW_EVENT
This event type is fired when check a row

<static> SweetDevRia.Grid.DELETE_ROW_EVENT
This event type is fired when delete a row

headPrefix
Ids

<static> SweetDevRia.Grid.HIDE_COL_EVENT
This event type is fired when hide a column

<static> {int} SweetDevRia.Grid.MODEL_EXPORT
This constant indicate that the excel export will contain all data included in server model.

<static> SweetDevRia.Grid.MOVE_COL_EVENT
This event type is fired when move a column

<static> {int} SweetDevRia.Grid.NO_SELECTION
This constant indicate that no selection is possible in this table.

onAddRow
Set the name of the javascript function to be called when the user add a row.

onChangePage
Set the name of the javascript function to be called when the user change page.

onCheckRow
Set the name of the javascript function to be called when a datagrid row is checked.

onDeleteRow
Set the name of the javascript function to be called when the user delete a row.

onHideColumn
Set the name of the javascript function to be called when a datagrid column is hide.

onMoveColumn
Set the name of the javascript function to be called when a datagrid column is moved.

onResize
Set the name of the javascript function to be called when a datagrid is resized.

onSelectCell
Set the name of the javascript function to be called when a datagrid cell is selected.

onSelectRow
Set the name of the javascript function to be called when a datagrid row is selected.

onSetData
Set the name of the javascript function to be called when the datagrid data are modifed.

onShowColumn
Set the name of the javascript function to be called when a datagrid column is showed.

onSortColumn
Set the name of the javascript function to be called when a datagrid column is sorted.

onUncheckRow
Set the name of the javascript function to be called when a datagrid row is unchecked.

onUnselectCell
Set the name of the javascript function to be called when a datagrid cell is unselected.

onUnselectRow
Set the name of the javascript function to be called when a datagrid row is unselected.

onUpdateCell
Set the name of the javascript function to be called when the user update a cell.

<static> SweetDevRia.Grid.REFRESH_GRID_EVENT
This event type is fired when refreshing the whole grid

<static> SweetDevRia.Grid.RESIZE_EVENT
This event type is fired when resize the grid

<static> {int} SweetDevRia.Grid.ROW_SELECTION
This constant indicate that the user can select only one row at once.

<static> {int} SweetDevRia.Grid.ROW_SELECTOR_CHECKBOX
This constant indicate that row selector is checkbox SWTRIA-1305

<static> {int} SweetDevRia.Grid.ROW_SELECTOR_RADIO
This constant indicate that row selector is radio button SWTRIA-1305

<static> {int} SweetDevRia.Grid.ROWS_SELECTION
This constant indicate that the user can select many rows.

<static> SweetDevRia.Grid.SELECT_CELL_EVENT
This event type is fired when select a cell

<static> SweetDevRia.Grid.SELECT_ROW_EVENT
This event type is fired when select a row

<static> SweetDevRia.Grid.SET_DATA_EVENT
This event type is fired when set the data

<static> SweetDevRia.Grid.SHOW_COL_EVENT
This event type is fired when show a column

<static> SweetDevRia.Grid.SORT_EVENT
This event type is fired when sort a column

tableBody
accessors

templatePageBar
Test d'une page barre avec select des pages, nombre total de page, select de nombre de ligne par page SWTRIA-1306

<static> SweetDevRia.Grid.UNCHECK_ROW_EVENT
This event type is fired when uncheck a row

<static> SweetDevRia.Grid.UNSELECT_CELL_EVENT
This event type is fired when unselect a cell

<static> SweetDevRia.Grid.UNSELECT_ROW_EVENT
This event type is fired when unselect a row

<static> SweetDevRia.Grid.UPDATE_CELL_EVENT
This event type is fired when upodate a cell

<static> {int} SweetDevRia.Grid.WYSIWYG_EXPORT
This constant indicate that the excel export will contain data like display at the screen (hidden columns, order, etc...).
Method Detail
<private> addCellSelection(rowId, columnId, test)
Select a cell
Parameters:
{String} rowId
Row identifiant of cell to select
{String} columnId
Column Id of the cell to select
{boolean} test
Test if the cell is alread in the selection

addColumn(id, header, size, ascendant, visible, resizable, sortable, hideable, editable, editable)
Add a new column in the datagrid. This column is added at the last position.
Parameters:
{String} id
Identifiant of this new column
{String} header
Header text of this new column
{int} size
Width of this new column
{boolean} ascendant
Indicate if this column must be sorted. True indicate this column must be ascendant sorted, false descendant sorted and null if not sorted.
{boolean} visible
Indicate if this column is visible
{boolean} resizable
Indicate if this column will be resizable by the user
{boolean} sortable
Indicate if this column will be sortable by the user
{boolean} hideable
Indicate if this column will be hideable by the user
{boolean} editable
Indicate if this column will be editable by the user
editable

addGroup(groupId, groupLabel, childrenIds)
Cree un nouveau group et y ajoute des ss group ou des ss colonnes
Parameters:
groupId
groupLabel
childrenIds

addMenuItem(Menu)
Add an item to the context menu
Parameters:
{SweetDevRia.MenuItem} Menu
Item to add

<private> addRowSelection(rowId, test)
Select a row
Parameters:
{String} rowId
Row identfiant to select
{boolean} test
Test if the row is alread in the selection

afterAddColumn(id, header, size, ascendant, visible, resizable, sortable, hideable, editable)
This method is called after Add a new column in the datagrid. This column is added at the last position.
Parameters:
{String} id
Identifiant of this new column
{String} header
Header text of this new column
{int} size
Width of this new column
{boolean} ascendant
Indicate if this column must be sorted. True indicate this column must be ascendant sorted, false descendant sorted and null if not sorted.
{boolean} visible
Indicate if this column is visible
{boolean} resizable
Indicate if this column will be resizable by the user
{boolean} sortable
Indicate if this column will be sortable by the user
{boolean} hideable
Indicate if this column will be hideable by the user
{boolean} editable
Indicate if this column will be editable by the user To be overridden !!

afterChangeItemPerPage(itemPerPage)
This method is called after changing the number of item displayed per page To be overridden !!
Parameters:
itemPerPage

afterClearSelection()
This method is called after Clear all table selection To be overridden !!

afterExcelExport(exportMode, exportdRowIds, exportId)
This method is called after Excel Export of rows To be overridden !!
Parameters:
{int} exportMode
Define if we export in wysiwyg mode or model mode. Possible values are SweetDevRia.Grid.WYSIWYG_EXPORT and SweetDevRia.Grid.MODEL_EXPORT
{Array} exportdRowIds
Array containing all exported row ids. If null, all rows will be exported.
{String} exportId
String representing the id of the export being processed.

afterGoToPage(actualPage)
This method is called after Change the displayed page into table pagination To be overridden !!
Parameters:
{int} actualPage
New displayed page number

afterGroupingBy(grouping)
This method is called after Execute a multiple column sort To be overridden !!
Parameters:
{Array} grouping
Contains all columns id to group by. exemple : ["col4","col1","col3"]

afterInitialize()
This method is called after Initialize the Grid. This method ms be called at the page load !!! To be overridden !!

afterMultipleColumnSort(columnsOrder)
This method is called after Execute a multiple column sort To be overridden !!
Parameters:
{Array} columnsOrder
Contains all columns order to sort.Each value is an array with the column id and the ascendant property. exemple : [["col4", true], ["col1", false], ["col3", true]]

afterRefresh()
This method is called after refreshing the grid To be overridden !!

afterResizing()
This method is called after the complete drag of the Grid To be overridden !!

afterSetCellSelection(rowId, columnId, select)
This method is called after Set a cell selection To be overridden !!
Parameters:
{String} rowId
Row identifiant of the cell's row to select or unselect
{String} columnId
Column identifiant of the cell to select or unselect
{boolean} select
Select the cell if true, else unselect

afterSetCheckbox(rowId, select, testAll)
This method is called after setting the check status of a row. Triggered on check, after pagin... To be overridden !!
Parameters:
{String} rowId
row identifiant
{boolean} select
True to select the checkbox, else false
{boolean} testAll
True if the method must test if all checbox are checked to check the checkboxAll, else false

afterSetCheckboxAll(select)
This method is called after Check or uncheck the html checkbox component which check all checkboxes To be overridden !!
Parameters:
{boolean} select
True to select the checkbox, else false

afterSetColumnPosition(colId, position)
This method is called after Set a column position To be overridden !!
Parameters:
{String} colId
Identifiant of the column to move
{int} position
New position of the column

afterSetColumnResizable(colId, resizable)
This method is called after Set the resizable column property To be overridden !!
Parameters:
{String} colId
Column identifiant to set
{boolean} resizable
New value of te resizable property. If true, te use will be able to resize this column, else not

afterSetColumnSize(colId, size)
This method is called after Set a colum width To be overridden !!
Parameters:
{Stirng} colId
Identifiant of the column to resize
{int} size
New width of the column

afterSetColumnSortable(colId, sortable)
This method is called after Set the sortable column property, This property indicate if the user can sort this column or not To be overridden !!
Parameters:
{String} colId
Column to set
{boolean} sortable
True if the user can sort this column, false if can't

afterSetColumnVisibility(colId, visibility)
This method is called after Set the column visiblity
Parameters:
{String} colId
Identifiant of the column to set
{boolean} visibility
the new visibility of the column To be overridden !!

afterSetData(data)
This method is called after Set the table data
Parameters:
{Array} data
The new Table data To be overridden !!

afterSetDraggableColumns(draggable)
This method is called after Set the draggableColumns property. This property indicate if the user can drag columns or not To be overridden !!
Parameters:
{boolean} draggable
If true, the user can drag columns, else false

afterSetHeight(height)
This method is called after Set the table height To be overridden !!
Parameters:
{int} height
The new table height

afterSetResizable(resizable)
This method is called after Set the resizable property. This method hide or show the resizer To be overridden !!
Parameters:
{boolean} resizable
True if the ser can resize the table, else false

afterSetRowSelection(rowId, select)
This method is called after Set a row selection To be overridden !!
Parameters:
{String} rowId
Identifiant of the row to select or unselect
{boolean} select
select the row if true, else unselect

afterSetSelectionMode(mode)
This method is called after Set the selection mode of the table To be overridden !!
Parameters:
{int} mode
New selection mode. Possible valus are SweetDevRia.Grid.NO_SELECTION, SweetDevRia.Grid.ROW_SELECTION, SweetDevRia.Grid.ROWS_SELECTION, SweetDevRia.Grid.CELL_SELECTION , SweetDevRia.Grid.CELLS_SELECTION

afterSetSize()
This method is called after Set the table size To be overridden !!

afterSetTooltips(data)
This method is called after Set the table cells tooltips
Parameters:
{Array} data
The new Table cells tooltips To be overridden !!

afterSetTotalDataNumber(data)
This method is called after Set the total data number of the table To be overridden !!
Parameters:
{int} data
number New total data number of the table

afterSetWidth(width)
This method is called after Set the table width To be overridden !!
Parameters:
{int} width
The new table width

afterShowGridProperties()
This method is called after showing the grid properties window To be overridden !!

afterSortColumn(colId, ascendant)
This method is called after Sort a column To be overridden !!
Parameters:
{String} colId
Identifiant of the column to sort
{boolean} ascendant
True is the column must be ascendant sorted, false for descendant sorting

{boolean} beforeAddColumn(id, header, size, ascendant, visible, resizable, sortable, hideable, editable)
This method is called before Add a new column in the datagrid. This column is added at the last position. To be overridden !!
Parameters:
{String} id
Identifiant of this new column
{String} header
Header text of this new column
{int} size
Width of this new column
{boolean} ascendant
Indicate if this column must be sorted. True indicate this column must be ascendant sorted, false descendant sorted and null if not sorted.
{boolean} visible
Indicate if this column is visible
{boolean} resizable
Indicate if this column will be resizable by the user
{boolean} sortable
Indicate if this column will be sortable by the user
{boolean} hideable
Indicate if this column will be hideable by the user
{boolean} editable
Indicate if this column will be editable by the user
Returns:
True if this method can be called, else false.

beforeChangeItemPerPage(itemPerPage)
This method is called before changing the number of item displayed per page To be overridden !!
Parameters:
itemPerPage

{boolean} beforeClearSelection()
This method is called before Clear all table selection To be overridden !!
Returns:
True if this method can be called, else false.

{boolean} beforeExcelExport(exportMode, exportdRowIds, exportId)
This method is called before Excel Export of rows To be overridden !!
Parameters:
{int} exportMode
Define if we export in wysiwyg mode or model mode. Possible values are SweetDevRia.Grid.WYSIWYG_EXPORT and SweetDevRia.Grid.MODEL_EXPORT
{Array} exportdRowIds
Array containing all exported row ids. If null, all rows will be exported.
{String} exportId
String representing the id of the export being processed.
Returns:
True if this method can be called, else false.

{boolean} beforeGoToPage(actualPage)
This method is called before Change the displayed page into table pagination To be overridden !!
Parameters:
{int} actualPage
New displayed page number
Returns:
True if this method can be called, else false.

{boolean} beforeGroupingBy(grouping)
This method is called before Execute a multiple column sort To be overridden !!
Parameters:
{Array} grouping
Contains all columns id to group by. exemple : ["col4","col1","col3"]
Returns:
True if this method can be called, else false.

{boolean} beforeInitialize()
This method is called before Initialize the Grid. This method ms be called at the page load !!! To be overridden !!
Returns:
True if this method can be called, else false.

{boolean} beforeMultipleColumnSort(columnsOrder)
This method is called before Execute a multiple column sort To be overridden !!
Parameters:
{Array} columnsOrder
Contains all columns order to sort.Each value is an array with the column id and the ascendant property. exemple : [["col4", true], ["col1", false], ["col3", true]]
Returns:
True if this method can be called, else false.

{boolean} beforeRefresh()
This method is called before refreshing the grid To be overridden !!
Returns:
True if this method can be called, else false.

beforeResizing()
This method is called after the complete drag of the Grid To be overridden !!

{boolean} beforeSetCellSelection(rowId, columnId, select)
This method is called before Set a cell selection To be overridden !!
Parameters:
{String} rowId
Row identifiant of the cell's row to select or unselect
{String} columnId
Column identifiant of the cell to select or unselect
{boolean} select
Select the cell if true, else unselect
Returns:
True if this method can be called, else false.

{boolean} beforeSetCheckbox(rowId, select, testAll)
This method is called before setting the check status of a row. Triggered on check, after pagin... To be overridden !!
Parameters:
{String} rowId
row identifiant
{boolean} select
True to select the checkbox, else false
{boolean} testAll
True if the method must test if all checbox are checked to check the checkboxAll, else false
Returns:
True if this method can be called, else false.

{boolean} beforeSetCheckboxAll(select)
This method is called before Check or uncheck the html checkbox component which check all checkboxes To be overridden !!
Parameters:
{boolean} select
True to select the checkbox, else false
Returns:
True if this method can be called, else false.

{boolean} beforeSetColumnPosition(colId, position)
This method is called before Set a column position To be overridden !!
Parameters:
{String} colId
Identifiant of the column to move
{int} position
New position of the column
Returns:
True if this method can be called, else false.

{boolean} beforeSetColumnResizable(colId, resizable)
This method is called before Set the resizable column property To be overridden !!
Parameters:
{String} colId
Column identifiant to set
{boolean} resizable
New value of te resizable property. If true, te use will be able to resize this column, else not
Returns:
True if this method can be called, else false.

{boolean} beforeSetColumnSize(colId, size)
This method is called before Set a colum width To be overridden !!
Parameters:
{Stirng} colId
Identifiant of the column to resize
{int} size
New width of the column
Returns:
True if this method can be called, else false.

{boolean} beforeSetColumnSortable(colId, sortable)
This method is called before Set the sortable column property, This property indicate if the user can sort this column or not To be overridden !!
Parameters:
{String} colId
Column to set
{boolean} sortable
True if the user can sort this column, false if can't
Returns:
True if this method can be called, else false.

{boolean} beforeSetColumnVisibility(colId, visibility)
This method is called before Set the column visiblity To be overridden !!
Parameters:
{String} colId
Identifiant of the column to set
{boolean} visibility
the new visibility of the column
Returns:
True if this method can be called, else false.

{boolean} beforeSetData(data)
This method is called before Set the table data To be overridden !!
Parameters:
{Array} data
The new Table data
Returns:
True if this method can be called, else false.

{boolean} beforeSetDraggableColumns(draggable)
This method is called before Set the draggableColumns property. This property indicate if the user can drag columns or not To be overridden !!
Parameters:
{boolean} draggable
If true, the user can drag columns, else false
Returns:
True if this method can be called, else false.

{boolean} beforeSetHeight(height)
This method is called before Set the table height To be overridden !!
Parameters:
{int} height
The new table height
Returns:
True if this method can be called, else false.

{boolean} beforeSetResizable(resizable)
This method is called before Set the resizable property. This method hide or show the resizer To be overridden !!
Parameters:
{boolean} resizable
True if the ser can resize the table, else false
Returns:
True if this method can be called, else false.

{boolean} beforeSetRowSelection(rowId, select)
This method is called before Set a row selection To be overridden !!
Parameters:
{String} rowId
Identifiant of the row to select or unselect
{boolean} select
select the row if true, else unselect
Returns:
True if this method can be called, else false.

{boolean} beforeSetSelectionMode(mode)
This method is called before Set the selection mode of the table To be overridden !!
Parameters:
{int} mode
New selection mode. Possible valus are SweetDevRia.Grid.NO_SELECTION, SweetDevRia.Grid.ROW_SELECTION, SweetDevRia.Grid.ROWS_SELECTION, SweetDevRia.Grid.CELL_SELECTION , SweetDevRia.Grid.CELLS_SELECTION
Returns:
True if this method can be called, else false.

{boolean} beforeSetSize(width, height)
This method is called before Set the table size To be overridden !!
Parameters:
{int} width
The new table width
{int} height
The new table height
Returns:
True if this method can be called, else false.

{boolean} beforeSetTooltips(data)
This method is called before Set the table cells tooltips To be overridden !!
Parameters:
{Array} data
The new Table cells tooltips
Returns:
True if this method can be called, else false.

{boolean} beforeSetTotalDataNumber(data)
This method is called before Set the total data number of the table To be overridden !!
Parameters:
{int} data
number New total data number of the table
Returns:
True if this method can be called, else false.

{boolean} beforeSetWidth(width)
This method is called before Set the table width To be overridden !!
Parameters:
{int} width
The new table width
Returns:
True if this method can be called, else false.

{boolean} beforeShowGridProperties()
This method is called before showing the grid properties window To be overridden !!
Returns:
True if this method can be called, else false.

{boolean} beforeSortColumn(colId, ascendant)
This method is called before Sort a column To be overridden !!
Parameters:
{String} colId
Identifiant of the column to sort
{boolean} ascendant
True is the column must be ascendant sorted, false for descendant sorting
Returns:
True if this method can be called, else false.

<private> {int} blocDescrIndexOf(blocDescr, name)
Return the position of one bloc with this name
Parameters:
{Object} blocDescr
the bloc description
{Object} name
the bloc name to find
Returns:
position of one bloc with this name

<private> callApplyGridProperties()
Action triggered on the grid properties through the window

<private> callExcelExport()
Call the excel export

callExportExcel()
Generate an axport to excel format. SWTRIA-1312

<private> callGrouping()
Call the Multiple Column Sort method with parameters of the multiple column sort Window

<private> callMultipleColumnSort()
Call the Multiple Column Sort method with parameters of the multiple column sort Window

changeItemPerPage(new)
Change the number of item displayed per page
Parameters:
{int} new
value of number of item displayed per page

checkSelection()
Check all checkboxes asscoiated with all selected rows. Be careful, this method do nothing in cell selection mode.

clearSelection()
Clear all table selection

<private> colHasParent(group)
Return if the column has a parent group
Parameters:
group
Returns:
boolean representing the column's belonging of the group

{boolean} containsData()
Return true if the table contains some data TT 458
Returns:
true if the table contains some data

convertToPx(size)
Fonctions utilitaires de sizing des colonnes **
Defined in: GridSize.js.
Parameters:
size

<private> createContextMenu(e)
Create the context menu. This menu is plugged on right click.
Parameters:
e

<private> createExcelProperties()
Create the excel Window

<private> createGridProperties()
Create the grid properties window, and the list inside

<private> createGroupingProperties()
Create the grouping Window

createIndexEmptyCols()
Create the structure for the grouping column header functionnality like this following example indexEmptyCol = [ [null, "G1", "G1", "G1", null, "G2", "G3, "G3", "G3"], [null, 3 , 3 , 3 , null, "GG1", "GG1", "GG1", "GG1"] ]

<private> createOrUpdatePageBar(pageBarId, isTop)
Parameters:
pageBarId
: id of page bar element to create or update
isTop
: if 'true' the page bar is top page bar (Mantis 36)

<private> createPageBar(pageBarId, isTop)
Create the pagination bar.
Parameters:
pageBarId
isTop

<private> createSortProperties()
Create the multiple column sort Window

<private> createSpliter(colId)
Create a new spliter used to resize columns
Parameters:
{String} colId
Column identifiant associated with this spliter

<private> deletePageBar(pageBarId)
Hide the pagination bar.
Parameters:
pageBarId

<private> dropColumn(table)
This method is called when the user drop a column
Parameters:
{Table} table
Table component

<private> dropDataColumn(id, nodeId, separatorId, targetId, isLast)
This method drop all datafrom a column position to another one
Parameters:
{String} id
Identifiant of the html body table
{String} nodeId
Moved column identifiant
{String} separatorId
Moved spliter identifiant
{String} targetId
Target column identifiant
{boolean} isLast
Indicate if the target position is the last one

excelExport(exportMode, exportdRowIds, exportId)
Excel Export of rows
Parameters:
{int} exportMode
Define if we export in wysiwyg mode or model mode. Possible values are SweetDevRia.Grid.WYSIWYG_EXPORT and SweetDevRia.Grid.MODEL_EXPORT
{Array} exportdRowIds
Array containing all exported row ids. If null, all rows will be exported.
{String} exportId
String representing the id of the export being processed.

<private> generateButtonbar(text, isTop)
Generate the HTML source for buttonbar SWTRIA-1303
Parameters:
text
: text flow where HTML code is added
isTop
: is toolbar at the top of the grid

<private> <static> SweetDevRia.Grid.generateContextMenu(e, id)
Initialize the Grid contextual menu on the first right click. This method must be called at the page load !!!
Parameters:
e
id

<private> generatePagebarContainer(text, isTop)
Generate the HTML source for buttonsbar SWTRIA-1303
Parameters:
text
: text flow where HTML code is added
isTop
: is toolbar at the top of the grid

<private> generateToolbar(text, isTop)
Generate the HTML source for whole toolbar (buttons bar and page bar) SWTRIA-1303
Parameters:
text
: text flow where HTML code is added
isTop
: is toolbar at the top of the grid

{String} getBlocHeaderHtml(blocDescr)
Return the html text writted in the grouping rows header To be overridden !!
Parameters:
{Array} blocDescr
Returns:
blocDescr grouping data description ex : ["Sebastien", "Revel", "Info", 3]
html text writted in the grouping rows header

<private> {Integer} getBodyHeight()
Return the body height
Returns:
the body height

{int} getBottomHeight()
Return the table bottom bar height
Returns:
table bottom bar height

<private> {int} getCellIndexFromPosition(position)
Find this cellIndex from the column position
Parameters:
{int} position
Column position which we search the cellIndex
Returns:
the cellIndex from the column

<private> {int} getCellIndexOfColumn(column)
Find this cellIndex from the column
Parameters:
{Column} column
Column which we search the cellIndex
Returns:
the cellIndex from the column

<private> getCentPercent()
SWTRIA-1348 Nouvelle methode de calcul de la taille de grid (sans parcourir toutes les colonnes)

{boolean} getCheckbox(rowId)
Return the value of the html checkbox component associated with one row
Parameters:
{int} rowId
Row identifiant
Returns:
true if the checkbox component is checked, flase else, or null if this checkbox doesn't exist

{boolean} getCheckboxAll()
Return the value of the html checkbox component which check all checkboxes
Returns:
true if the checkbox component is checked, flase else, or null if this checkbox doesn't exist

{Array} getCheckedRows()
Return the checked rows identifiants. The list is exhaustive and return also the rows not loaded, which data are not present in the client.
Returns:
checked rows identifiants

{Object} getColumn(colId)
Return the column
Parameters:
{String} colId
Identifiant of the searched column
Returns:
the column from its identifiant

{Object} getColumnAtPosition(position)
Return the column from its position
Parameters:
{int} position
Returns:
the column from its position

{String} getColumnIdAtPosition(position)
Return the column id from its position
Parameters:
{int} position
Position of the searched column id
Returns:
the column id from its position

{int} getColumnIndex(column)
Retourne index de la colonne en fonction de sa position
Defined in: GridSize.js.
Parameters:
column
colonne dont on cherche l'index dans le tag tr
Returns:
index de la colonne en fonction de sa position

{int} getColumnNumber()
Return the total number of columns
Returns:
the total number of columns

{int} getColumnPosition(colId)
Return the column position
Parameters:
{String} colId
Identifiant of the searched column position
Returns:
the column position

{int} getColumnSize(colId)
Return the column size
Parameters:
{String} colId
Identifiant of the searched column size
Deprecated:
cf GridSize.js
Returns:
the column size

{boolean} getColumnVisibility(colId)
Return the column visibility
Parameters:
{String} colId
Identifiant of the searched column visibility
Returns:
the column visibility

<private> {Object} getColumnWithCellIndex(cellIndex)
Find the column from this cellIndex
Parameters:
{int} cellIndex
of the searched column
Returns:
the column from this cellIndex

<private> {String} getDataStr()
Return the html string representing the data zone
Returns:
html string representing the data zone

{boolean} getDisplayCheckbox()
Return the displayCheckbox property
Returns:
true if checkboxes are displayed, else false

<private> getDisplayedCellValue(rowId, columnId, cellValue)
Parameters:
rowId
columnId
cellValue

{boolean} getDraggableColumns()
Indicate if the user can drag columns or not
Returns:
true if the user can drag columns, else false

<private> {Column} getFirstColumn()
Return the first column
Returns:
first column

<private> {tr} getFirstRow()
Return the first row (tr tag), not grouping header
Returns:
the first row (tr tag), not grouping header

<private> {Column} getFirstVisibleColumn()
Return the first visible column
Returns:
first visible column

{int} getFirstVisibleIndex()
Return the first visible index in the data
Returns:
the first visible index in the data

<private> {tr} getFirstVisibleRow()
Return the first visible row (tr tag), not grouping header
Returns:
the first visible row (tr tag), not grouping header

{Array} getGridSize()
Return the table size
Returns:
table size

getGroup(groupId)
Retourne un group ou une colonne a partir de son identifiant
Parameters:
groupId

<private> {HtmlElement} getHeaderFromX(x)
Return the header from a x position. This method is called during column header drag drop.
Parameters:
{int} x
X position
Returns:
header from a x position. This method is called during column header drag drop.

<private> {String} getHeaderText(colId)
Return the header text of the column. This method remove the header html code, just return text.
Parameters:
{String} colId
Column identifiant associated with the header
Returns:
header text of the column. This method remove the header html code, just return text.

{int} getHeight()
Return the table height
Returns:
table height

<private> {int} getHeightHeader()
Return the header height
Returns:
header height

<private> {int} getHeightRow()
Return the default row height
Returns:
row height

<private> {Column} getLastColumn()
Return the last column
Returns:
last column

<private> {Column} getLastVisibleColumn()
Return the last visible column
Returns:
last visible column

{int} getLastVisibleIndex()
Return the last visible index in the data
Returns:
the last visible index in the data

<private> {tr} getLastVisibleRow()
Return the last visible row (tr tag), not grouping header or detail
Returns:
the last visible row (tr tag), not grouping header or detail

<private> getMaxHeight()
Compute maximum height of the grid
Returns:
a value in pixel

<private> getMaxWidth()
Compute maximum width of the grid
Returns:
a value in pixel

{int} getMinColumnWidth()
Return the minimum column width
Returns:
minimum column width

<private> getMinHeight()
Compute minimum height of the grid
Returns:
a value in pixel

<private> getMinWidth()
Compute minimum width of the grid
Returns:
a value in pixel

<private> getNextCell(td)
return the next cell of html table
Parameters:
{HtmlTd} td
Cell which we search the next

<private> {Array} getNextCellSelection(lastSelection, evt, swapRow)
Find the next selection with a keycode (left, up, rigth, bottom arrow) from a selection.
Parameters:
{Array} lastSelection
Start selection ( [rowId, columnId] )
{Event} evt
Key event
{boolean} swapRow
If true, when you search the next cell of the last cell of a row, this method return the first cell of the next row. Default is true
Returns:
the next cell ids selection, [rowId, columnId]

<private> {Column} getNextColumn(col)
Return the next column of this Grid. Be carefull, this method don't take into account the visibility column property.
Parameters:
{Column} col
Reference Column which we search the next one
Returns:
next column
See:
getNextVisibleColumn

<private> getNextEditableCell(lastSelection, evt, swapRow)
Parameters:
lastSelection
evt
swapRow

<private> {String} getNextRowSelection(lastSelection, evt)
Find the next selection with a keycode (left, up, rigth, bottom arrow) from a selection.
Parameters:
{String} lastSelection
Start selection (rowId)
{Event} evt
Key event
Returns:
the next row id selection

<private> {Column} getNextVisibleColumn(col)
Return the next visible column of this Grid. Be carefull, this method take into account the visibility column property.
Parameters:
{Column} col
Reference Column which we search the next one
Returns:
next visible column
See:
getNextColumn

<private> {tr} getNextVisibleRow(rows, rowIndex)
Return the next visible row, not detail or grouping header
Parameters:
{Array} rows
the rows array
{int} rowIndex
the actual index
Returns:
next visible row, not detail or grouping header

<private> {Integer} getPageBarHeight()
Return the pagination bar height
Returns:
the pagination bar height

<private> getPreviousCell(td)
return the previous cell of html table
Parameters:
{HtmlTd} td
Cell which we search the previous

<private> {Column} getPreviousColumn(col)
Return the previous column of this Grid. Be carefull, this method don't take into account the visibility column property.
Parameters:
{Column} col
Reference Column which we search the previous one
Returns:
previous column
See:
getPreviousVisibleColumn

<private> {Column} getPreviousVisibleColumn(col)
Return the previous visible column of this Grid. Be carefull, this method take into account the visibility column property.
Parameters:
{Column} col
Reference Column which we search the previous one
Returns:
previous visible column
See:
getPreviousColumn

<private> {tr} getPreviousVisibleRow(rows, rowIndex)
Return the previous visible row, not detail or grouping header
Parameters:
{Array} rows
the rows array
{int} rowIndex
the actual index
Returns:
previous visible row, not detail or grouping header

<private> {int} getPreviousVisibleSpliterPosition(the)
Find the previous visible spliter
Parameters:
{int} the
current position
Returns:
the previous position

{boolean} getResizable()
Indicate if the table is resizable or not.
Returns:
true if the user can resize table, else false

<private> {String} getRowBlocStr(blocDescrIndex)
Return the html string representing a row group
Parameters:
{int} blocDescrIndex
The index of the bloc description to displayed
Returns:
html string representing a row group

{Map} getRowData(rowId)
return the row data contained in the grid for a specific rowId
Parameters:
{String} rowId
Returns:
map a map with the column id as key and cell value as value. ( {"colid":"cellvalue"} )

<private> {String} getRowIdByIndex(rowIndex)
return the row identifiant of the row at the rowIndex position
Parameters:
{Object} rowIndex
Returns:
row identifiant of the row at the rowIndex position

<private> {int} getRowIndex(rows, rowIndex)
Get the real row index from the visible row index
Parameters:
{HtmlRows} rows
Set of html rows
{int} rowIndex
visible row index
Returns:
real row index from the visible row index

<private> {Array} getRowsForBloc(blocDescrIndex)
Return all rows of this bloc
Parameters:
{int} blocDescrIndex
Index oif the searced bloc
Returns:
all rows of this bloc

{String | Array} getSelection()
Return the table selection
Returns:
table selection, rowId for row selection, [rowId, columnId] for cell selection

{int} getSelectionMode()
Return the selection mode of the table
Returns:
selection mode of the table

{int} getToolBarsHeight()
Get height of toolbars around the table
Returns:
height of toolbars around the table

{int} getTotalDataNumber()
Return the total data number of the table
Returns:
the total data number of the table

{Column} getVisibleColumnByPos(pos)
Return the visible column by this position, ex : the third visible column is ...
Parameters:
{int} pos
the searched position
Returns:
the visible column at this position

{int} getVisibleColumnNumber()
Return the number of visible columns
Returns:
the total number of visible columns

{int} getVisibleIndexById(colId)
Return the visible index of this column. ex: this column is the third visible cols
Parameters:
{String} colId
The column id
Returns:
the visible index of this column

{int} getVisibleRowNumber()
Return the displayed rows number
Returns:
displayed rows number

{int} getWidth()
Return the table width
Returns:
table width

goToPage(actualPage)
Change the displayed page into table pagination
Parameters:
{int} actualPage
New displayed page number
See:
SweetDevRia.PageBar.prototype.goToPage

groupingBy(grouping)
Execute a multiple column sort
Parameters:
{Array} grouping
Contains all columns id to group by. exemple : ["col4","col1","col3"]

<private> handleEvent(evt)
Handle key events to modify selection
Parameters:
{Event} evt
Key event

<private> hidePageBar(pageBarId)
Turn bar visibility off pageBarId id of the page bgar (top or bottom). ID = [GRID ID]+"_"+SweetDevRia.Grid.PAGEBAR+ ("_top" | "_bottom")
Parameters:
pageBarId

incrDepth(groupId, depth)
On incremente de maniere recursive la propriete& depth des fils de ce group ou colonne
Parameters:
groupId
depth

<private> initGroupingData(dataGrp, tab, tabAll)
Process grouping data to save in groupingDataDescr property
Parameters:
{Array} dataGrp
grouping data exemple : [ ["Sebastien", [ ["Revel", [ ["Info", [["row0","31","toto1"],["row2","32","toto2"],["row3","33","toto3"]] ] ] ] ] ], ..... ]
{Array} tab
{Array} tabAll
Returns:
grouping data to save in groupingDataDescr property ex : [["Sebastien", "Revel", "Info", 3], .....]

<private> initialize()
Initialize the Grid. This method must be called at the page load !!!

{boolean} isInSelection(obj)
Test if a cell or a row is selected or not
Parameters:
{String | String[2]} obj
rowId for a row test and [rowId, columnId] for a cell test
Returns:
true if the cell or the row is selected, else false

<private> keySelection(evt)
Manage the key selection (simple or multiple)
Parameters:
{Event} evt
Key event

loadRows()
Load data rows of the current page into the table

multipleColumnSort(columnsOrder)
Execute a multiple column sort
Parameters:
{Array} columnsOrder
Contains all columns order to sort.Each value is an array with the column id and the ascendant property. exemple : [["col4", true], ["col1", false], ["col3", true]]

<private> onDragColumn(table)
This method put the dragdrop arrow at the good place according to header drag position. It s called during column drag.
Parameters:
{Table} table
Table component

<private> onGrouping(evt)
This method is called on server grouping callback
Parameters:
{RiaEvent} evt
Event containing data to displayed

<private> onPagin(evt)
This method is called on server pagination callback
Parameters:
{RiaEvent} evt
Event containing data to displayed

onPropertiesCheck(evt, params)
Action executer qd on clique sur l une des checkbox de visibilite de la fenetre de properties de la grid. Le check/uncheck provoque le add/delete de l'item associe dans la liste de sort
Parameters:
evt
params

<private> onSelectCellEvt(mouse, rowId, columnId)
Method is called when the user click on a cell.
Parameters:
{Event} mouse
clic event
{String} rowId
Row identifiant of the clicked cell
{String} columnId
Column identifiant of the clicked cell

<private> onSort(evt)
This method is called on server sort callback
Parameters:
{RiaEvent} evt
Event containing data to displayed

refresh()
Refresh the table content.

<private> refreshCheckboxes()
Refresh all checbox state. This method is called after a sort or a pagination.

<private> refreshColumnVisibilities()
Refresh all columns visibilities. Hide all hiddens, show all visibles.

<private> refreshSelection()
Refresh all selection. This method is called after a sort or a pagination.

<private> removeCellSelection(rowId, columnId)
Unselect a cell
Parameters:
{String} rowId
Row identifiant of cell to unselect
{String} columnId
Column Id of the cell to unselect

<private> removeRowSelection(rowId)
Unselect a row
Parameters:
{String} rowId
Row identfiant to unselect

<private> renameSeparator(colBeforeId, colId)
Rename a spliter. Used when the user move a column.
Parameters:
{String} colBeforeId
Identifiant of the associated column before rename
{String} colId
Identifiant of the associated column after rename

<private> resetAllColumnSortClass()
Reset All header column style

<private> resetSpliters()
Reset spliters constraints

selectAll()
Select all rows or cells if multiple selection is ok.

selectCellBloc(cellIds1, cellIds2, select)
Allow you to select a cells bloc in one shot ! that's select all cell between cell1 and cell2.
Parameters:
{[rowId|columnId]} cellIds1
First bloc cell identifiants
{[rowId|columnId]} cellIds2
Last bloc cell identifiants
{boolean} select
True if you want select the bloc, false else

selectRowBloc(rowId1, rowId2, select)
Allow you to select a rows bloc in one shot ! that's select all rows between row1 and row2.
Parameters:
{String} rowId1
First identifiant row of the bloc
{String} rowId2
Last identifiant row of the bloc
{boolean} select
True if you want select the bloc, false else

setCellSelection(rowId, columnId, select)
Set a cell selection
Parameters:
{String} rowId
Row identifiant of the cell's row to select or unselect
{String} columnId
Column identifiant of the cell to select or unselect
{boolean} select
Select the cell if true, else unselect

setCheckbox(rowId, select, testAll)
Check or uncheck the html checkbox component associated with one row
Parameters:
{String} rowId
row identifiant
{boolean} select
True to select the checkbox, else false
{boolean} testAll
True if the method must test if all checbox are checked to check the checkboxAll, else false

setCheckboxAll(select)
Check or uncheck the html checkbox component which check all checkboxes
Parameters:
{boolean} select
True to select the checkbox, else false

<private> setColumnElementsVisibility(colId, visibility)
Set all column elements visiblity
Parameters:
{String} colId
Identifiant of the column to show or hide
{boolean} visibility
The new visibility of the column

setColumnPosition(colId, position)
Set a column position
Parameters:
{String} colId
Identifiant of the column to move
{int} position
New position of the column

setColumnResizable(colId, resizable)
Set the resizable column property
Parameters:
{String} colId
Column identifiant to set
{boolean} resizable
New value of te resizable property. If true, te use will be able to resize this column, else not

setColumnSize(colId, size, true)
Set a column width
Parameters:
{String} colId
Identifier of the column to resize
{int} size
New width of the column
{boolean} true
if initializing

setColumnSortable(colId, sortable)
Set the sortable column property, This property indicate if the user can sort this column or not
Parameters:
{String} colId
Column to set
{boolean} sortable
True if the user can sort this column, false if can't

<private> setColumnSortClass(colId, ascendant, mouseover)
Refresh the header column style
Parameters:
{String} colId
The column id to refresh
{boolean} ascendant
True is the column must be ascendant sorted, false for descendant sorting
{boolean} mouseover
Tells if the function is used to inverse temporarly the arrow

setColumnVisibility(colId, visibility)
Set the column visibility
Parameters:
{String} colId
Identifiant of the column to set
{boolean} visibility
the new visibility of the column

setConstraintId(constraintId)
Set the constraintId. If this id is not null, the user won't be able to resize the grid outside this container.
Parameters:
{String} constraintId
The new container identifiant

setData(data)
Set the table data
Parameters:
{Array} data
The new Table data

setDisplayCheckbox(displayCheckbox)
Set the displayCheckbox property
Parameters:
{boolean} displayCheckbox
True if checkboxes must be displayed, else false

setDraggableColumns(draggable)
Set the draggableColumns property. This property indicate if the user can drag columns or not
Parameters:
{boolean} draggable
If true, the user can drag columns, else false

<private> setElementVisibility(elem, visibility, size)
Set an element visiblity
Parameters:
{HtmlElement} elem
Html elmenent to show or hide
{boolean} visibility
The new visibility of the element
{int} size
the size of the column to use instead of auto

setGroupBy(groupBy)
Define grouping columns ids
Parameters:
{Arrray} groupBy
Array of column id to group.

setHeight(height)
Set the table height
Parameters:
{int} height
The new table height

<private> setHeightHeader(heightHeader)
Set the header height
Parameters:
{int} heightHeader
The new header height

setHeightIfNotSet()
Fixe la hauteur de la grid et du bodyDiv en fonction de la taille reelle du bodyDiv
Defined in: GridSize.js.

<private> setHeightRow(heightRow)
Set the default row
Parameters:
{int} heightRow
The new default row height

setMaxHeight(maxHeight)
Set the new max height constraint for the resize
Parameters:
{String} maxHeight
The new max height constraint for the resize

setMaxWidth(maxWidth)
Set the new max width constraint for the resize
Parameters:
{String} maxWidth
The new max width constraint for the resize

setMinColumnWidth(minColumnWidth)
Set the minimum column width
Parameters:
{int} minColumnWidth
The new minimum column width

setMinHeight(data)
Set the table data
Parameters:
{Array} data
The new Table data

setMinWidth(minWidth)
Set the new min minWidth constraint for the resize
Parameters:
{String} minWidth
The new min width constraint for the resize

<static> SweetDevRia.Grid.setPropertiesCheck(check, checked)
set visibility of a checkbox into the property window
Parameters:
check
{input} the checkbox to check
checked
{Boolean} state of the checkbox

setResizable(resizable)
Set the resizable property. This method hide or show the resizer
Parameters:
{boolean} resizable
True if the ser can resize the table, else false

<private> setRowPerPage(rowPerPage)
Set the row number per page
Parameters:
{int} rowPerPage
Row number per page. Default is 50.

setRowSelection(rowId, select)
Set a row selection
Parameters:
{String} rowId
Identifiant of the row to select or unselect
{boolean} select
select the row if true, else unselect

setSelectionMode(mode)
Set the selection mode of the table
Parameters:
{int} mode
New selection mode. Possible valus are SweetDevRia.Grid.NO_SELECTION, SweetDevRia.Grid.ROW_SELECTION, SweetDevRia.Grid.ROWS_SELECTION, SweetDevRia.Grid.CELL_SELECTION , SweetDevRia.Grid.CELLS_SELECTION

setSize(width, height)
Set the table size
Parameters:
{int} width
The new table width
{int} height
The new table height

setTooltips(tooltips)
Set the cells tooltips
Parameters:
{Array} tooltips
The new cells tooltips

setTotalDataNumber(mode)
Set the total data number of the table
Parameters:
{int} mode
New total data number of the table

setWidth(width)
Set the table width
Parameters:
{int} width
The new table width

shiftColumnsHeader(the, the, isLastPosition)
Shift the columns headers in the table
Parameters:
{int} the
position where the column is inserted
{int} the
former column position
isLastPosition

shiftColumnsHeaderWidth(the, the, isLastPosition, wasLastPosition)
Shift the columns headers width in the table colgroup
Parameters:
{int} the
position where the column is inserted
{int} the
former column position
isLastPosition
wasLastPosition

shiftColumnsPosition(the, the)
Shift the column data in the columnsAtPosition list
Parameters:
{int} the
position where the column is inserted
{int} the
former column position

<private> showExcelProperties(exportId)
Show the Excel Window
Parameters:
exportId

showGridProperties()
Show the Grid Properties Window

<private> showGroupingProperties()
Show the grouping Window

<private> showPageBar(pageBarId)
Turn bar visibility on pageBarId id of the page bgar (top or bottom). ID = [GRID ID]+"_"+SweetDevRia.Grid.PAGEBAR+ ("_top" | "_bottom")
Parameters:
pageBarId

<private> showSortProperties()
Show the multiple column sort Window

sortColumn(colId, ascendant)
Sort a column
Parameters:
{String} colId
Identifiant of the column to sort
{boolean} ascendant
True is the column must be ascendant sorted, false for descendant sorting

swapColumnVisibility(colId)
Swap the column visibility. Hide the column if it's visible, else show it.
Parameters:
{String} colId
Identifiant of the column to swap

<private> swapRowBloc(blocDescrIndex)
Swap the visibility of a grouping row bloc
Parameters:
{int} blocDescrIndex
The index of the bloc to swap

<private> switchPageBarVisibility(pageBarId)
Switch bar visibility pageBarId id of the page bgar (top or bottom). ID = [GRID ID]+"_"+SweetDevRia.Grid.PAGEBAR+ ("_top" | "_bottom")
Parameters:
pageBarId

<private> switchRowWrapMode(rowId)
Change le mode wrap / nowrap (passage a la ligne) du contenu des cellules d'une ligne SWTRIA-1315
Parameters:
rowId

<private> synchronizeHeader()
Synchronize the scroll position between header and body.

<private> synchronizeScrollers(selection)
Synchronize table scrollers to follow the selection
Parameters:
{rowId | [rowId|colunId]} selection
Selected row or cell ids

<private> {boolean} testElementVisibility(elem)
Test an element visiblity
Parameters:
{HtmlElement} elem
Html elmenent to test
Returns:
true if elem is visible, false if not, null if elem doesn t exist

<private> {boolean} testHeaderVisibilty(node)
Test the header visiblity
Parameters:
{HtmlElement} node
Header to test
Returns:
true is the node is visible, false else.

testIfScrollBarNeeded(isRootNodeOpen)
SWTRIA-1335 Permet d'afficher ou non la barre de scrolling de facon automatique en fonction des cas
Parameters:
isRootNodeOpen
{Boolean} vrai si le noeud root du TreeGrid est deploye

<private> testIfTopPageBarIfNeeded()
SWTRIA-1306 Permet d'afficher ou non la barre de pagination du haut de facon automatique

<private> updateCell(rowId, columnId, cellValue)
Parameters:
rowId
columnId
cellValue

updateColumnHeaderSize(column, newSize)
Met a jour le header d'une colonne � la taille donnee, ou a la taille theorique de la colonne si newSize n'est pas defini
Defined in: GridSize.js.
Parameters:
column
newSize

updateGroupHeadersSize(width)
Met a jour la largeur group headers. Si width n'est pas defini, on utilise la largeur de la ligne de headers.
Defined in: GridSize.js.
Parameters:
width
la nouvelle largeur.

updateHeadDivForScroll()
Fait apparaitre/disapraitre le dissimulateur place en haut a droite de la grid en fonction de l'apparition/disparition de la barre de scroll verticale. Ne touche pas a la taille des colonnes
Defined in: GridSize.js.

updateLastColumnSize(diff, headerDone)
Met a jour la taille du header et des cellules de la derniere colonne en lui ajoutant la valeur de diff qui peut etre negative
Defined in: GridSize.js.
Parameters:
diff
(int) la difference a ajouter a la largeur de la derniere colonne
headerDone
(boolean) precise s'il faut egalement resizer le header

updateLastColumnSizeToHeaderSize()
Met a jour la taille des cellules de la derniere colonne pour qu'elle corresponde a la taille actuelle du header
Defined in: GridSize.js.

updateServerModel(fire)
Send all client grid information to the server to update the server model. Be careful, this is a synchrone ajax call. This method is called before call server side pagination, sort or excel export.
Parameters:
{boolean} fire
Tell if the update should be send right away to the server

<private> {String} veloGroupHead()
Return the html string representing the grouping head zone
Returns:
html string representing the grouping head zone

Documentation generated by JsDoc Toolkit 2.0.0 on Thu May 05 2011 12:20:31 GMT+0200 (CEST)