Column

The Column Class provides properties, methods, and events to interface with the HTML tags generated by the <silk:Column> tag. This is used internally by the Table Class.

Kind: global class

Methods and Event

new Column()

Returns a Column instance.

getAlign() ⇒ String

Returns the column's alignment.

Kind: instance method of Column

getCssClass() ⇒ String

Returns the column's CSS class.

Kind: instance method of Column

getData(index, item)

Returns the cell text.

Kind: instance method of Column

Param
Type
Description

index

Integer

The data provider index.

item

Object

The object with the row structure.

getDistinct()

Return the column used to check the distict condition.

Kind: instance method of Column

getDraggable() ⇒ Booelan

Returns the column's dragable condition.

Kind: instance method of Column

getID() ⇒ String

Returnt the column's' id. The id is composed by the name of the table, underscore, and column name. If not provided the name will be "ht*".

Kind: instance method of Column

getInput(index, item, type, object)

Returns the Input's HTML to be rendered in the cell.

Kind: instance method of Column

Param
Type
Description

index

Integer

The data provider index.

item

Object

The object with the row structure.

type

String

The input type

object

Object

An object with custom properties to be stored in the input.

getInputType() ⇒ String

Returns the column's input type.

Kind: instance method of Column

getLabelColumn() ⇒ String

Returns the data provider's column holding the input's label.

Kind: instance method of Column

getOrdering() ⇒ Boolean

Return the column's ordering condition.

Kind: instance method of Column

getSortColumn() ⇒ String

Returns the data provider's column use to sort the table.

Kind: instance method of Column

getTableID() ⇒ String

Returns column's table's id.

Kind: instance method of Column

getTargetPage() ⇒ String

Returns the target page when column gets clicked.

Kind: instance method of Column

getTemplate() ⇒ String

Return the HTML template used to generate the cell text.

Kind: instance method of Column

getTitle() ⇒ String

Returns the column's' title.

Kind: instance method of Column

getValign() ⇒ String

Returns the column's vertical alignment.

Kind: instance method of Column

getValueColumn() ⇒ String

Returns the data provider's column holding the input's value.

Kind: instance method of Column

getVisible() ⇒ Boolean

Returns the the column's visible condition. This triggers the "visible" event.

Kind: instance method of Column

getWidth() ⇒ String

Returns the column's width.

Kind: instance method of Column

getWrap() ⇒ Boolean

Returns the column's wrap condition. It is false as default.

Kind: instance method of Column

on

Extends the "on" method from the eventManager Class.

Kind: instance property of Column

Param
Type
Description

eventName

String

The event's name.

eventFunction

function

The function to be triggered.

setAlign(newAlign)

Sets the column's alignment. Same value as a CSS styling.

Kind: instance method of Column

Param
Type
Description

newAlign

String

The new alignment.

setCssClass(newClass)

Sets the column's CSS class.

Kind: instance method of Column

Param
Type
Description

newClass

String

The new CSS class.

setDistinct(columm)

Sets the column to check distinct condition.

Kind: instance method of Column

Param
Type
Description

columm

String

The column to check.

setTableID(newTableID)

Sets the column's table's id.

Kind: instance method of Column

Param
Type
Description

newTableID

String

The table's id.

setTargetPage(newTarget)

Sets the target page called when the cell is clicked.

Kind: instance method of Column

Param
Type
Description

newTarget

String

The new target page.

setTemplate(newTemplate)

Sets the HTML template used to render the cell text.

Kind: instance method of Column

Param
Type
Description

newTemplate

String

The new HTML template.

setTitle(newTitle)

Sets the column's' title.

Kind: instance method of Column

Param
Type
Description

newTitle

String

The new title.

setValign(newValign)

Sets the column's vertical alignment. Seame value as a CSS styling.

Kind: instance method of Column

Param
Type
Description

newValign

String

The new vertical alignment.

setWidth(newWidth)

Sets the column's width. This shoudl use the same width format as CSS styling.

Kind: instance method of Column

Param
Type
Description

newWidth

String

The new column's width.

setWrap(newWrap)

Sets the column's wrap condition. The values are "true" or "false".

Kind: instance method of Column

Param
Type
Description

newWrap

Boolean

The wrap condition.

showPage()

Shows a page using the "targetPage" property.

Kind: instance method of Column

on:visible

Event triggered the column is rendered. If the event's' function returns true the column will be added. If it returns false it will not be added. Created with the Column.on("visible", function(item){}) method.

Kind: event emitted by Column