jqGrid
└─hgGridEdit
└─hgGridRender
└─hgTreeGrid
public abstract class hgTreeGrid
extends hgGridRender
| Field Summary | |
|---|---|
| boolean | If set to false all data is available at client side |
| boolean | Should be all nodes expanded when loaded at client |
| Fields inherited from hiGrid\hgGridRender | |
|---|---|
| csvfile, csvsep, csvsepreplace, export, exportfile, inlineNav, navigator, pdffile, sharedAddOptions, sharedDelOptions, sharedEditOptions, toolbarfilter | |
| Fields inherited from hiGrid\hgGridEdit | |
|---|---|
| add, decodeinput, del, edit, getLastInsert, mtype, serialKey, trans | |
| Fields inherited from hiGrid\jqGrid | |
|---|---|
| ExportCommand, SubgridCommand, cacheCount, customClass, customError, customFunc, dataType, datearray, debug, encoding, errorMessage, gSQLMaxRows, higridSC, jsonencode, logtofile, mongofields, mongointegers, oper, optimizeSearch, performcount, readFromXML, showError, table, version, xmlCDATA | |
| Method Summary | |
|---|---|
| void | setData(array d) Se the tree data for future processing |
| void | setLeafData(array d) Set a leaf nodes for adjacency model |
| void | setTreeModel(string model) Set the tree mode used. |
| string | Returns the currently used tree model |
| void | setTableConfig(array aconfig) Set the configuration fields for the model used. |
| array | Return the curent configuration for the model used |
| array | getLeafNodes(integer node) Return the leaf nodes when the adjacency model is used. |
| protected void | getChildNodes(integer node, string order_field, boolean id) Return all Child nodes for both methods. |
| protected array | getChildren(integer node_id) Return the child nodes of a given node. |
| protected array | getRoots() Return the root nodes when adjacency model. |
| mixed | queryTree(array summary, array params, boolen echo) Return the result of the query to hgTreeGrid. |
| boolean | updateTreeNode(array data) Update the data into the database according the table element A primaryKey should be set. |
| boolean | insertTreeNode(array data) Insert the data array into the database according to the table element and tree model. |
| boolean | deleteTreeNode(array data) Delete the data into the database according the table element and tree grid model. |
| void | editTree(array summary, array params, string oper, bool echo) Perform the all CRUD operations depending on the oper param send from the grid, the table element and the treegrid model If the primaryKey is not set we try to obtain it using hiGridDB::getPrimaryKey If the primary key is not set or can not be obtained the operation is aborted. |
| mixed. | higridtreedisplay(string tblelement, string pager, boolean script, array summary, array params, boolean createtbl, boolean createpg, boolean echo) Main method which do allmost everthing for the tree grid. |
| Methods inherited from hiGrid\hgGridRender | |
|---|---|
| addCol, callGridMethod, getColModel, getGridOption, getInlineOptions, higridOP, higridsCP, higridsGO, higridsNO, inlineNavEvent, inlineNavOptions, setAutocomplete, setButtonOptions, setColModel, setDatepicker, setFilterOptions, setGridEvent, setJSCode, setNavEvent, setSelect, setSubGrid, setSubGridGrid, setUrl | |
| Methods inherited from hiGrid\hgGridEdit | |
|---|---|
| checkPrimary, delete, editGrid, getFields, getLastInsertId, getPrimaryKeyId, insert, setAfterCrudAction, setBeforeCrudAction, setPrimaryKeyId, setSuccessMsg, setTable, update | |
| Methods inherited from hiGrid\jqGrid | |
|---|---|
| __construct, addUserData, buildSearch, debugout, execute, exportToCsv, exportToExcel, exportToPdf, getDbDate, getDbTime, getGridParams, getSqlElement, getStringForGroup, getUserDate, getUserTime, logQuery, parseSql, queryForObject, queryGrid, querySubGrid, rs2excel, rs2pdf, selectLimit, sendErrorHeader, setDbDate, setDbTime, setGridParams, setPdfOptions, setUserDate, setUserTime | |
public boolean $autoLoadNodes = true
If set to false all data is available at client side
public boolean $expandAll = false
Should be all nodes expanded when loaded at client
public void setData(array d)
Se the tree data for future processing
public void setLeafData(array d)
Set a leaf nodes for adjacency model
public void setTreeModel(string model)
Set the tree mode used. Can be adjacency or nested. Deafault is nested
public string getTreeModel()
Returns the currently used tree model
public void setTableConfig(array aconfig)
Set the configuration fields for the model used. For the adjacency model a 'id' and 'parent' should be set For the nested model 'id', 'left', 'right' and 'level' should be set Optional fields for all models : expanded, icon, leaf, loaded
public array getTableConfig()
Return the curent configuration for the model used
public array getLeafNodes(integer node)
Return the leaf nodes when the adjacency model is used. Note that the table and table configuration should be set
protected void getChildNodes(integer node, string order_field, boolean id)
Return all Child nodes for both methods. The data is populated in the protected variable $res.
protected array getChildren(integer node_id)
Return the child nodes of a given node. If the node is not specifies return the root nodes. Used only in adjacency model. Uses the data array
protected array getRoots()
Return the root nodes when adjacency model. Uses data array
public mixed queryTree(array summary, array params, boolen echo)
Return the result of the query to hgTreeGrid. Currently does not support searching.
public boolean updateTreeNode(array data)
Update the data into the database according the table element A primaryKey should be set. If the key is not set It can be obtained from hiGridDB::getPrimaryKey. Return true on success, false when the operation is not succefull
public boolean insertTreeNode(array data)
Insert the data array into the database according to the table element and tree model. A primaryKey should be set. If the key is not set It can be obtained from hiGridDB::getPrimaryKey. The table config for the tree should be set.
public boolean deleteTreeNode(array data)
Delete the data into the database according the table element and tree grid model. A primaryKey should be set. If the key is not set It can be obtained from hiGridDB::getPrimaryKey Return true on success, false when the operation is not succefull
public void editTree(array summary, array params, string oper, bool echo)
Perform the all CRUD operations depending on the oper param send from the grid, the table element and the treegrid model If the primaryKey is not set we try to obtain it using hiGridDB::getPrimaryKey If the primary key is not set or can not be obtained the operation is aborted. Also the method call the queryTree to perform the tree ouput
public mixed. higridtreedisplay(string tblelement, string pager, boolean script, array summary, array params, boolean createtbl, boolean createpg, boolean echo)
Main method which do allmost everthing for the tree grid. Construct the tree grid, perform CRUD operations, perform Query set a jqGrid method, and javascript code.