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
StringReturns the column's alignment.
Kind: instance method of Column
getCssClass() ⇒ String
StringReturns the column's CSS class.
Kind: instance method of Column
getData(index, item)
Returns the cell text.
Kind: instance method of Column
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
BooelanReturns the column's dragable condition.
Kind: instance method of Column
getID() ⇒ String
StringReturnt 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
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
StringReturns the column's input type.
Kind: instance method of Column
getLabelColumn() ⇒ String
StringReturns the data provider's column holding the input's label.
Kind: instance method of Column
getOrdering() ⇒ Boolean
BooleanReturn the column's ordering condition.
Kind: instance method of Column
getSortColumn() ⇒ String
StringReturns the data provider's column use to sort the table.
Kind: instance method of Column
getTableID() ⇒ String
StringReturns column's table's id.
Kind: instance method of Column
getTargetPage() ⇒ String
StringReturns the target page when column gets clicked.
Kind: instance method of Column
getTemplate() ⇒ String
StringReturn the HTML template used to generate the cell text.
Kind: instance method of Column
getTitle() ⇒ String
StringReturns the column's' title.
Kind: instance method of Column
getValign() ⇒ String
StringReturns the column's vertical alignment.
Kind: instance method of Column
getValueColumn() ⇒ String
StringReturns the data provider's column holding the input's value.
Kind: instance method of Column
getVisible() ⇒ Boolean
BooleanReturns the the column's visible condition. This triggers the "visible" event.
Kind: instance method of Column
getWidth() ⇒ String
StringReturns the column's width.
Kind: instance method of Column
getWrap() ⇒ Boolean
BooleanReturns 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
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
newAlign
String
The new alignment.
setCssClass(newClass)
Sets the column's CSS class.
Kind: instance method of Column
newClass
String
The new CSS class.
setDistinct(columm)
Sets the column to check distinct condition.
Kind: instance method of Column
columm
String
The column to check.
setTableID(newTableID)
Sets the column's table's id.
Kind: instance method of Column
newTableID
String
The table's id.
setTargetPage(newTarget)
Sets the target page called when the cell is clicked.
Kind: instance method of Column
newTarget
String
The new target page.
setTemplate(newTemplate)
Sets the HTML template used to render the cell text.
Kind: instance method of Column
newTemplate
String
The new HTML template.
setTitle(newTitle)
Sets the column's' title.
Kind: instance method of Column
newTitle
String
The new title.
setValign(newValign)
Sets the column's vertical alignment. Seame value as a CSS styling.
Kind: instance method of Column
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
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
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