thyGridRow

This is the Grid Row class.  It is just a thyPanel with a thyVisualCollection of thyGridCell elements.

CSS Classes

  • .thyGridRow
  • .<object name>

See Also

Summary
This is the Grid Row class.
Initialization Method.
Append a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow
Append a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow.
Remove a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow
Remove a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow.
Removes all CSS classes from both cellCSSClasses and cellIndexedCSSClasses
Sets the Index of this Row
Returns the index of this Row
Inserts a Cell into the specified column
Returns the contents of the Cell that resides on the specified column
Returns the thyGridCell element that resides on the specified position
Returns a thyCollection with the contents of the Selected Cells
Returns the number of cells this row has
Removes the Cell on the specified column
Changes the position of a Cell to a new place
Used to check if the cell is selected or not
Selects the whole row, BUT DO NOT CALL event ‘onselectrow’
Selects the whole Row, that means, all Cells and calls event handler ‘onselectrow’ and ‘onselectrow<n>’ where <n> is the row index.
Unselects the whole row, BUT DO NOT CALL event ‘onunselectrow’
Unselectes the whole Row, that means, all Cells and calls event handler ‘onselectrow’ and ‘onselectrow<n>’ where <n> is the row index.
Changes the selected state to its oposit state
Selects all cells if any cell is selected
Selects all cells only if clicking on row header
Overwritten method that draws TR element instead of DIV
Overloaded method that creates the TR element and inserts it into parent
Append a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow
Append a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow.
Remove a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow
Remove a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow.
Removes all CSS classes from both cellCSSClasses and cellIndexedCSSClasses
Creates a Cell and sets all CSS Classes that has been passed to thyGridRow
Updates the names of all Cells to reflect their real positions and also updates all CSS indexed classes
Updates the classes of the specified cell
Updates the classes of every cell
Removes the classes of every cell

initThyGridRow

p.initThyGridRow = function ()

Initialization Method.  Inserts the Row header Cell

addCellCSSClass

p.addCellCSSClass = function (cssClass)

Append a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow

Parameter

cssClassThe CSS class

addCellIndexedCSSClass

p.addCellIndexedCSSClass = function (cssClass)

Append a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow.  This classes will be appended with the Cell column index

Parameter

cssClassThe CSS class

removeCellCSSClass

p.removeCellCSSClass = function (cssClass)

Remove a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow

Parameter

cssClassThe CSS class

removeCellIndexedCSSClass

p.removeCellIndexedCSSClass = function (cssClass)

Remove a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow.  This classes will be appended with the Cell column index

Parameter

cssClassThe CSS class

removeAllCellClasses

p.removeAllCellClasses = function ()

Removes all CSS classes from both cellCSSClasses and cellIndexedCSSClasses

setIndex

p.setIndex = function (index)

Sets the Index of this Row

Parameter

indexThe new Row index

getIndex

p.getIndex = function ()

Returns the index of this Row

insertCell

p.insertCell = function (content,
column,
type)

Inserts a Cell into the specified column

Parameters

contentThe cell content
columnThe column index
typeThe cell type (n - normal, h - header)

getCell

p.getCell = function (column)

Returns the contents of the Cell that resides on the specified column

Parameter

columnThe column index

getCellElement

p.getCellElement = function (column)

Returns the thyGridCell element that resides on the specified position

If what you want is just the cell contents, please use thyGridRow::getCell

This method should ONLY be used if developer wants to manipulate cell properties!  Be warned that messing with wrong property may break encapsulation and thus produce undesired effects on thyGridRow

Parameter

columnThe column index

getSelectedCells

p.getSelectedCells = function ()

Returns a thyCollection with the contents of the Selected Cells

getCellsCount

p.getCellsCount = function ()

Returns the number of cells this row has

removeCell

p.removeCell = function (column)

Removes the Cell on the specified column

Parameter

columnThe column index

Returns

The Cell contents

moveCell

p.moveCell = function (orig,
dest)

Changes the position of a Cell to a new place

Parameters

origThe original column
destThe destination column

isSelected

p.isSelected = function ()

Used to check if the cell is selected or not

Returns

BooleanTrue if selected, False if not selected

selectOnly

p.selectOnly = function ()

Selects the whole row, BUT DO NOT CALL event ‘onselectrow’

select

p.select = function ()

Selects the whole Row, that means, all Cells and calls event handler ‘onselectrow’ and ‘onselectrow<n>’ where <n> is the row index.

unselectOnly

p.unselectOnly = function ()

Unselects the whole row, BUT DO NOT CALL event ‘onunselectrow’

unselect

p.unselect = function ()

Unselectes the whole Row, that means, all Cells and calls event handler ‘onselectrow’ and ‘onselectrow<n>’ where <n> is the row index.

switchSelectedState

p.switchSelectedState = function ()

Changes the selected state to its oposit state

setSelectCellSelectRow

p.setSelectCellSelectRow = function ()

Selects all cells if any cell is selected

unsetSelectCellSelectRow

p.unsetSelectCellSelectRow = function ()

Selects all cells only if clicking on row header

getOuterHTML

p.getOuterHTML = function ()

Overwritten method that draws TR element instead of DIV

Private Methods

_create

p._create = function ()

Overloaded method that creates the TR element and inserts it into parent

_addCellCSSClass

p._addCellCSSClass = function (cssClass)

Append a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow

Parameter

cssClassThe CSS class

_addCellIndexedCSSClass

p._addCellIndexedCSSClass = function (cssClass)

Append a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow.  This classes will be appended with the Cell column index

Parameter

cssClassThe CSS class

_removeCellCSSClass

p._removeCellCSSClass = function (cssClass)

Remove a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow

Parameter

cssClassThe CSS class

_removeCellIndexedCSSClass

p._removeCellIndexedCSSClass = function (cssClass)

Remove a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow.  This classes will be appended with the Cell column index

Parameter

cssClassThe CSS class

removeAllCellClasses

p._removeAllCellClasses = function ()

Removes all CSS classes from both cellCSSClasses and cellIndexedCSSClasses

_createCell

p._createCell = function (colIndex,
type)

Creates a Cell and sets all CSS Classes that has been passed to thyGridRow

Parameters

colIndexThe column index of this cell
typeThe Cell type.  Can be ‘n’ for normal or ‘h’ for header

_updateNames

p._updateNames = function ()

Updates the names of all Cells to reflect their real positions and also updates all CSS indexed classes

_updateClasses

p._updateClasses = function (cell,
cellIdx)

Updates the classes of the specified cell

Parameter

cellThe specific cell
cellIdxThe index of the cell

_updateAllClasses

p._updateAllClasses = function ()

Updates the classes of every cell

_removeAllClasses

p._removeAllClasses = function ()

Removes the classes of every cell

p.initThyGridRow = function ()
Initialization Method.
p.addCellCSSClass = function (cssClass)
Append a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow
This is the Grid Row class.
p.addCellIndexedCSSClass = function (cssClass)
Append a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow.
p.removeCellCSSClass = function (cssClass)
Remove a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow
p.removeCellIndexedCSSClass = function (cssClass)
Remove a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow.
p.removeAllCellClasses = function ()
Removes all CSS classes from both cellCSSClasses and cellIndexedCSSClasses
p.setIndex = function (index)
Sets the Index of this Row
p.getIndex = function ()
Returns the index of this Row
p.insertCell = function (content,
column,
type)
Inserts a Cell into the specified column
p.getCell = function (column)
Returns the contents of the Cell that resides on the specified column
p.getCellElement = function (column)
Returns the thyGridCell element that resides on the specified position
This is the basic Cell element.
p.getSelectedCells = function ()
Returns a thyCollection with the contents of the Selected Cells
This is the basic ThyAPI Collection Element.
p.getCellsCount = function ()
Returns the number of cells this row has
p.removeCell = function (column)
Removes the Cell on the specified column
p.moveCell = function (orig,
dest)
Changes the position of a Cell to a new place
p.isSelected = function ()
Used to check if the cell is selected or not
p.selectOnly = function ()
Selects the whole row, BUT DO NOT CALL event ‘onselectrow’
p.select = function ()
Selects the whole Row, that means, all Cells and calls event handler ‘onselectrow’ and ‘onselectrow<n>’ where n is the row index.
p.unselectOnly = function ()
Unselects the whole row, BUT DO NOT CALL event ‘onunselectrow’
p.unselect = function ()
Unselectes the whole Row, that means, all Cells and calls event handler ‘onselectrow’ and ‘onselectrow<n>’ where n is the row index.
p.switchSelectedState = function ()
Changes the selected state to its oposit state
p.setSelectCellSelectRow = function ()
Selects all cells if any cell is selected
p.unsetSelectCellSelectRow = function ()
Selects all cells only if clicking on row header
p.getOuterHTML = function ()
Overwritten method that draws TR element instead of DIV
p._create = function ()
Overloaded method that creates the TR element and inserts it into parent
p._addCellCSSClass = function (cssClass)
Append a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow
p._addCellIndexedCSSClass = function (cssClass)
Append a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow.
p._removeCellCSSClass = function (cssClass)
Remove a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow
p._removeCellIndexedCSSClass = function (cssClass)
Remove a CSS class to the list of classes that will be added to all Cells created/manipulated by thyGridRow.
p._createCell = function (colIndex,
type)
Creates a Cell and sets all CSS Classes that has been passed to thyGridRow
p._updateNames = function ()
Updates the names of all Cells to reflect their real positions and also updates all CSS indexed classes
p._updateClasses = function (cell,
cellIdx)
Updates the classes of the specified cell
p._updateAllClasses = function ()
Updates the classes of every cell
p._removeAllClasses = function ()
Removes the classes of every cell
Base class for all other ThyAPI GUI Components
This is the visual ThyAPI Collection Element.
This is the Grid Element, the holder of cells.