thyGridCell

This is the basic Cell element.  It should provides all functionalities that a Table Cell element should have.

CSS Classes

  • .thyGridCell_edit - when in simple edit mode
  • .thyGridCell_editFull - when in full edit mode
  • .thyGridCell_selected - when selected
  • .thyGridCell_header - when type is header
  • .thyGridCell_header_selected - when type is header and it is selected
  • .<object name>_edit - when in simple edit mode
  • .<object name>_editFull - when in full edit mode
  • .<object name>_selected - when selected
  • .<object name>_header - when type is header
  • .<object name>_header_selected - when type is header and it is selected
Summary
This is the basic Cell element.
Sets the contents of the cell.
Gets the contents of the cell.
Adds a widget inside the cell
Overloaded method that sets HTML of Contents, never putting empty HTML inside box (otherwise it would not be visible).
Overloaded method that returns the HTML of Contents and not the HTML of cell.
Sets the selected state of this Cell
Switches the actual selected state, turning the cell into selected if it is not and vice-versa
Returns the selected state of this Cell
Overwritten method that draws TD element instead of DIV
Process the modifications needed to achieve the selected mode.
Process the modifications needed to achieve the type mode.
Method that handles onclick events

ThyAPI

ThyWidgets

See Also

Summary
Sets the contents of the cell.
Gets the contents of the cell.
Adds a widget inside the cell
Overloaded method that sets HTML of Contents, never putting empty HTML inside box (otherwise it would not be visible).
Overloaded method that returns the HTML of Contents and not the HTML of cell.
Sets the selected state of this Cell
Switches the actual selected state, turning the cell into selected if it is not and vice-versa
Returns the selected state of this Cell
Overwritten method that draws TD element instead of DIV
Process the modifications needed to achieve the selected mode.
Process the modifications needed to achieve the type mode.
Method that handles onclick events

populate

p.populate = function (data)

Sets the contents of the cell.

Parameter

dataThe contents of the Cell, that can be:
  • A non-object data (will be included as HTML to the contents of the cell)
  • A thyPanel or derivate class object that will be added as child.
  • A thyCollection of thyPanel or derivate classe objects, that will be added sequentially as children.

sweepOut

p.sweepOut = function ()

Gets the contents of the cell.

If the contents of the cell is simply HTML, it is returned, otherwise in case the cell has children, their sweepOut() returned values are grouped in a thyCollection and returned.

addChild

p.addChild = function (child)

Adds a widget inside the cell

setHTML

p.setHTML = function (html)

Overloaded method that sets HTML of Contents, never putting empty HTML inside box (otherwise it would not be visible).

Parameter

htmlThe HTML code to be inserted

getHTML

p.getHTML = function ()

Overloaded method that returns the HTML of Contents and not the HTML of cell.  Besides that, it garantees that the return is not ‘&nbsp;’, which is set as HTML when setHTML receives a null parameter.

setMode

p.setMode = function(mode)

Sets the onclick exchange mode of the grid.  This can be

  • r (Read Only)
  • rws (Simple Read/Write)
  • rwf (Full Read/Write)

Parameters

modeThe mode
  • Note - The only supported mode now is Read Only

setType

p.setType = function(type)

Change this object type to one of

  • Normal
  • Header

Parameters

typeThe type.  ‘n’ for Normal, ‘h’ for header

setSelected

p.setSelected = function(state)

Sets the selected state of this Cell

Parameters

statetrue/false

switchSelectedState

p.switchSelectedState = function()

Switches the actual selected state, turning the cell into selected if it is not and vice-versa

isSelected

p.isSelected = function()

Returns the selected state of this Cell

Returns

Boolean

getOuterHTML

p.getOuterHTML = function ()

Overwritten method that draws TD element instead of DIV

_processMode

p._processMode = function()

Process the modifications needed to achieve the selected mode.

_processType

p._processType = function()

Process the modifications needed to achieve the type mode.

_selectEvent

p._selectEvent = function()

Method that handles onclick events

p.populate = function (data)
Sets the contents of the cell.
p.sweepOut = function ()
Gets the contents of the cell.
p.addChild = function (child)
Adds a widget inside the cell
p.setHTML = function (html)
Overloaded method that sets HTML of Contents, never putting empty HTML inside box (otherwise it would not be visible).
p.getHTML = function ()
Overloaded method that returns the HTML of Contents and not the HTML of cell.
p.setMode = function(mode)
p.setType = function(type)
p.setSelected = function(state)
Sets the selected state of this Cell
p.switchSelectedState = function()
Switches the actual selected state, turning the cell into selected if it is not and vice-versa
p.isSelected = function()
Returns the selected state of this Cell
p.getOuterHTML = function ()
Overwritten method that draws TD element instead of DIV
p._processMode = function()
Process the modifications needed to achieve the selected mode.
p._processType = function()
Process the modifications needed to achieve the type mode.
p._selectEvent = function()
Method that handles onclick events
This is the Grid Element, the holder of cells.
Base class for all other ThyAPI GUI Components
This is the basic ThyAPI Collection Element.