Constructor Summary
Public Constructor | ||
public |
constructor(id: String, options: Object) Constructor |
Method Summary
Public Methods | ||
public |
clearSelection(): Null Clears the currently selected table rows or cells |
|
public |
This method collapses the row passed as a parameter |
|
public |
Returns the data item to which the specified table row is bound. |
|
public |
This method expands the row. |
|
public |
Obtains an Array of the DOM elements, which correspond to the data items. |
|
public |
Gets or sets the table rows (or cells) which are selected. |
|
public |
setDataSource(dataSource: Array): Null Sets the data source of the widget. |
Public Constructors
public constructor(id: String, options: Object) source
Constructor
Params:
Name | Type | Attribute | Description |
id | String | treelist id |
|
options | Object | config params |
|
options.dataSource | Array | the data source of the widget which is used to render table rows. A JavaScript array. |
|
options.columns | Array | the configuration of the treelist columns. An array of JavaScript objects. |
|
options.columns.field | String | the field to which the column is bound. The value of this field is displayed by the column during data binding. |
|
options.columns.title | String | the text that is displayed in the column header cell. If not set the field is used. |
|
options.columns.attributes | Object | HTML attributes of the table cell (<td>) rendered for the column. |
|
options.columns.headerAttributes | Object | HTML attributes of the table header cell (<th>) rendered for the column. |
|
options.columns.width | Number | the width of the column. Numeric values are treated as pixels. |
|
options.columns.expandable | Boolean | if set to true the column will show the icons that are used for expanding and collapsing child rows.(default: false) |
|
options.resizable | Boolean | if set to true allows usersto resize columns by dragging their header borders. By default resizing is disabled. |
|
options.height | Number | the height of the treelist. Numeric values are treated as pixels. |
|
options.scrollable | Boolean | if set to true the TreeList will display a scrollbar when the total row height (or width) exceeds the TreeList height (or width). By default scrolling is enabled. |
|
options.selectable | Boolean | String | if set to true the user would be able to select treelist rows. By default selection is disabled.
|
|
options.change | function(e: Object): null | fired when the user selects a table row or cell in the treelist. |
Public Methods
public collapse(row: Object): Null source
This method collapses the row passed as a parameter
Params:
Name | Type | Attribute | Description |
row | Object | A string, DOM element or jQuery object which represents the table row. A string is treated as a jQuery selector. |
Return:
Null |
public dataItem(row: Object): Object source
Returns the data item to which the specified table row is bound.
Params:
Name | Type | Attribute | Description |
row | Object | A string, DOM element or jQuery object which represents the table row. A string is treated as a jQuery selector. |
public expand(row: Object): Null source
This method expands the row.
Params:
Name | Type | Attribute | Description |
row | Object | A string, DOM element or jQuery object which represents the table row. A string is treated as a jQuery selector. |
Return:
Null |
public items(): Array source
Obtains an Array of the DOM elements, which correspond to the data items.