SMART datagrid v.1 > Functions

Back  Forward

DataLudi.createTreeView  Function

Create TreeView by Dom element id being transferred to parameter and column information array. 

function createTreeView (containerId: String, columns: [Object], dom: Boolean);
Returns
Void
Parameters
containerId - String. required.
Element ID which will contain Grid Canvas or Div element.
columns - [Object].
Array of column setting objects.
dom - Boolean. Defaults to false.
If it is true, it will create the grid implemented by DOM element rather than Canvas. It will not be changed after creating the grid.
Code -1
    var columns = [{
        name: 'colName',
        fieldName: 'fldName'
    }, {
        name: 'colAddr',
        fieldName: 'fldAddr'
    }, 
    ...
    ];
    var treeView = DataLudi.createTreeView('treeContainer', columns);
    // or DOM version
    var treeView = DataLudi.createTreeView('treeContainer', columns, true);
See Also
TreeView
GridColumn
createTreeDataSet
createGridView
Examples
Hello Tree