Name | Type | Default |
altRows
|
boolean
|
false
|
Sets or gets whether the jqxTreeGrid automatically alternates row colors.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} altRows={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
autoRowHeight
|
boolean
|
true
|
Sets or gets whether the jqxTreeGrid automatically calculates the rows height and wraps the cell text.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} autoRowHeight={false} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
aggregatesHeight
|
number
|
34
|
Sets or gets the height of the aggregates bar. Aggregates bar is displayed after setting showAggregates to true.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} aggregatesHeight={40} showAggregates={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
autoShowLoadElement
|
boolean
|
true
|
Sets or gets whether the loading html element with animated gif is automatically displayed by the widget during the data binding process.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} autoShowLoadElement={false} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
checkboxes
|
boolean
|
false
|
Determines whether checkboxes are displayed or not.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} checkboxes={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
columnsHeight
|
number
|
30
|
Sets or gets the height of the columns header.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} columnsHeight={40} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
columns
|
Array<any>
|
[]
|
Sets the jqxTreeGrid's columns.
- text - string property which sets the column header's text.
- dataField - string property which sets the column's bound field. It should be unique and should point to a data field defined in the jqxDataAdapter's dataFields array.
- displayField - string property which sets the column's display field. It should be unique and should point to a data field defined in the jqxDataAdapter's dataFields array.
- sortable - boolean property which determines whether the column is sortable.
- filterable - boolean property which determines whether the column is filterable.
- hidden - boolean property which determines whether the column is visible or hidden.
- columnGroup - string property which determines the name of the column's parent group. It should point to a valid name defined in the
columnGroups .
- autoCellHeight - boolean property which determines whether the cell's data wrapping is enabled. This property is set to
true by default. When autoRowHeight is enabled and autoCellHeight is set to false, the cell's data will not be wrapped.
- renderer - callback function for custom rendering of the column's header.
- rendered - callback function which is called after the column's header rendering is completed.
- cellsRenderer - callback function which is called when a cell is being rendered. The result of that function should be valid and well-formatted HTML string. The cellsRenderer function has 4 parameters passed by jqxTreeGrid - row's key, column's data field, cell's value, row's data as an object of Key/Value pairs.
- columnType - string property which determines the column's type.
Possible values:
- "template" - sets a custom editor as a default editor for the column. The editor should be created in the
createEditor callback function. The editor should be synchronized with the cell's value in the initEditor callback. The editor's value should be retrieved in the getEditorValue callback function.
- "custom" - sets a custom editor as a default editor for a cell. That setting enables you to have different cell editors in the column. The editors should be created in the
createEditor callback function which is called for each row when the columnType property is set to "custom". The editors should be synchronized with the cell's value in the initEditor callback. The editor's value should be retrieved in the getEditorValue callback function.
- validation - callback function which is called when the jqxTreeGrid's edited row needs to be validated. The function has 2 parameters - edit cell and the cell's value. The function should return true or false, depending on the user's validation logic. It can also return a validation object with 2 fields - "result" - true or false, and "message" - validation string displayed to the users.
- initEditor - callback function which is called when an editor is opened. It has 5 parameters - row's key, cell's value, the editor element, cell's width and cell's height. The function can be used for adding some custom parameters to the editor.
- createEditor - callback function which is called just once when the cells editor is created. It has 5 parameters - row's key, cell's value, the editor element, cell's width and cell's height. The function can be used for adding some custom parameters to the editor.
- getEditorValue - callback function which could be used for overriding the value returned by the editor. It is useful for advanced scenarios with custom editors. It has 3 parameters - row's key, cell's value and the editor element. The result of the function is expected to be the editor's new value.
- cellsFormat - determines the Format string used for formatting the cell values.
Possible number strings: "d" - decimal numbers. "f" - floating-point numbers. "n" - integer numbers. "c" - currency numbers. "p" - percentage numbers.
For adding decimal places to the numbers, add a number after the formatting string. For example: "c3" displays a number in this format $25.256 Possible built-in Date formats:
// short date pattern d: "M/d/yyyy", // long date pattern D: "dddd, MMMM dd, yyyy", // short time pattern t: "h:mm tt", // long time pattern T: "h:mm:ss tt", // long date, short time pattern f: "dddd, MMMM dd, yyyy h:mm tt", // long date, long time pattern F: "dddd, MMMM dd, yyyy h:mm:ss tt", // month/day pattern M: "MMMM dd", // month/year pattern Y: "yyyy MMMM", // S is a sortable format that does not vary by culture S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss"
Possible Date format strings:
"d"-the day of the month; "dd"-the day of the month; "ddd"-the abbreviated name of the day of the week; "dddd"- the full name of the day of the week; "h"-the hour, using a 12-hour clock from 1 to 12; "hh"-the hour, using a 12-hour clock from 01 to 12; "H"-the hour, using a 24-hour clock from 0 to 23; "HH"- the hour, using a 24-hour clock from 00 to 23; "m"-the minute, from 0 through 59; "mm"-the minutes,from 00 though59; "M"- the month, from 1 through 12; "MM"- the month, from 01 through 12; "MMM"-the abbreviated name of the month; "MMMM"-the full name of the month; "s"-the second, from 0 through 59; "ss"-the second, from 00 through 59; "t"- the first character of the AM/PM designator; "tt"-the AM/PM designator; "y"- the year, from 0 to 99; "yy"- the year, from 00 to 99; "yyy"-the year, with a minimum of three digits; "yyyy"-the year as a four-digit number;
- aggregates - array property which determines the column aggregates.
Aggregate functions:
- 'avg' - Average aggregate
- 'count' - Count aggregate
- 'min' - Min aggregate
- 'max' - Max aggregate
- 'sum' - Sum aggregate
- 'product' - Product aggregate
- 'stdev' - Standard deviation on a sample.
- 'stdevp' - Standard deviation on an entire population.
- 'varp' - Variance on an entire population.
- 'var' - Variance on a sample.
Custom Aggregate
aggregates: [{ 'In Stock':
function (aggregatedValue, currentValue) {
if (currentValue) {
return aggregatedValue + 1;
}
return aggregatedValue;
}
}
Custom Aggregate which aggregates values from two columns
{ text: 'Price', dataField: 'price', cellsAlign: 'right', cellsFormat: 'c2', aggregates: [{ 'Total':
function (aggregatedValue, currentValue, column, record) {
var total = currentValue * parseInt(record['quantity']);
return aggregatedValue + total;
}
}]
}
'In Stock' - the aggregate's display name. The function has 2 params - the aggregated value and the current value. It should return an aggregated value.
- aggregatesRenderer - callback function which could be used for customization of the aggregates rendering. It has 1 parameter - the column's aggregates.
- align - string property which determines the alignment of the column's header. Possible values: 'left', 'center' or 'right'
- cellsAlign - string property which determines the alignment of the column's cells. Possible values: 'left', 'center' or 'right'.
- width - numeric property which determines the column's width.
- minWidth - numeric property which determines the column's minimum width. Default value: 25.
- maxWidth - numeric property which determines the column's maximum width.
- resizable - boolean property which determines whether the column is resizable.
- draggable - boolean property which determines whether the column is draggable.
- editable - boolean property which determines whether the column is editable.
- className - string property which sets a custom CSS class for the column's header
- cellClassName - string or function property which sets a custom CSS class for the column's cells. The value could be a "string" or "Function".
- pinned - boolean property which determines whether the column is pinned(frozen).
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
columnGroups
|
Array<any>
|
[]
|
Sets the jqxTreeGrid's column groups.
- parentGroup - string property which determines the parent group's name.
- name - string property which determines the group's name.
- align - string property which determines the column header's alignment. Possible values: 'left', 'center' or 'right'.
|
columnsResize
|
boolean
|
false
|
Sets or gets the jqxTreeGrid's columnsResize.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} columnsResize={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
columnsReorder
|
boolean
|
false
|
Sets or gets the jqxTreeGrid's columnsReorder.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} columnsReorder={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
disabled
|
boolean
|
false
|
Sets or gets whether the jqxTreeGrid is disabled.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} disabled={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
editable
|
boolean
|
false
|
Sets or gets whether the jqxTreeGrid editing is enabled.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} editable={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
editSettings
|
TreeGridEditSettings
|
{ saveOnPageChange: true, saveOnBlur: true, saveOnSelectionChange: true, cancelOnEsc: true, saveOnEnter: true, editSingleCell: false, editOnDoubleClick: true, editOnF2: true }
|
Interface TreeGridEditSettings { saveOnEnter?: boolean; saveOnPageChange?: boolean; saveOnBlur?: boolean; saveOnSelectionChange?: boolean; cancelOnEsc?: boolean; editSingleCell?: boolean; editOnDoubleClick?: boolean; editOnF2?: boolean; }
Sets or gets the jqxTreeGrid's edit settings.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { editSettings: { saveOnPageChange: true, saveOnBlur: true, saveOnSelectionChange: true, cancelOnEsc: true, saveOnEnter: true, editOnDoubleClick: true, editOnF2: false }, source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} editable={true} editSettings={this.state.editSettings} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
exportSettings
|
TreeGridExportSettings
|
{columnsHeader: true, hiddenColumns: false, serverURL: null, characterSet: null, collapsedRecords: false, recordsInView: true,fileName: "jqxTreeGrid"}
|
Interface TreeGridExportSettings { columnsHeader?: boolean; hiddenColumns?: boolean; serverURL?: string | any; characterSet?: string; collapsedRecords?: boolean; recordsInView?: boolean; fileName?: string | null; }
Determines the Data Export settings used by jqxTreeGrid when exportData is called. See also the exportData method.
- columnsHeader - boolean value. Determines whether the columns header is exported. Note that Stacked Headers are not exported.
- hiddenColumns - boolean value. Determines whether the hidden columns would be exported.
- serverURL - string or Null. Determines the Exporter File's URL.
- characterSet - string value. Determines the character set used by the exporter.
- collapsedRecords - boolean value. Determines whether the collapsed records would be included in the export.
- recordsInView - boolean value. Determines whether the filtered/sorted set of records would be exported. Otherwise, the widget would not take into account the filtering and sorting.
- fileName - string value. Determines the export file's name.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { exportSettings: { columnsHeader: true, collapsedRecords: true, hiddenColumns: false }, source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} exportSettings={this.state.exportSettings} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
enableHover
|
boolean
|
true
|
Sets or gets whether row highlighting is enabled.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} enableHover={false} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
enableBrowserSelection
|
boolean
|
false
|
Enables or disables the default text selection of the web browser.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} enableBrowserSelection={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
filterable
|
boolean
|
false
|
Enables/Disables the filtering feature.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} filterable={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
filterHeight
|
number
|
30
|
Sets or gets the Filter Element's height.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} filterable={true} filterHeight={40} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
filterMode
|
TreeGridFilterMode
|
"default"
|
TreeGridFilterMode: "default" | "simple" | "advanced"
Determines the Filter's mode. Possible values: "default" , "simple" and "advanced"
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} filterable={true} filterMode={ 'advanced'} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
height
|
number | string
|
null
|
Sets or gets the jqxTreeGrid's height.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} height={200} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
hierarchicalCheckboxes
|
boolean
|
false
|
Determines whether changing a checkbox state affects the parent/child records check state. Note: "checkboxes" property value is expected to be true.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} checkboxes={true} hierarchicalCheckboxes={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
icons
|
any
|
false
|
Determines whether icons are displayed or not.
|
incrementalSearch
|
boolean
|
true
|
Determines whether the incremental search is enabled. The feature allows you to quickly find and select data records by typing when the widget is on focus.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} incrementalSearch={false} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
localization
|
any
|
default localization strings.
|
Applies a localization to the jqxTreeGrid's strings.
{ // separator of parts of a date (e.g. "COLOR: #a24; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; PADDING-LEFT: 0px; CLEAR: both; MARGIN: 0px; PADDING-RIGHT: 0px">'/' in 11/05/1955) '/': "/", // separator of parts of a time (e.g. ':' in 05:44 PM) ':': ":", // the first day of the week (0 = Sunday, 1 = Monday, etc) firstDay: 0, days: { // full day names names: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // abbreviated day names namesAbbr: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // shortest day names namesShort: [ "Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"] }, months: { // full month names (13 months for lunar calendards -- 13th month should be "" if not lunar) names: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ""], // abbreviated month names namesAbbr: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ""] }, // AM and PM designators in one of these forms: // The usual view, and the upper and lower case versions // [standard,lowercase,uppercase] // The culture does not use AM or PM (likely all standard date formats use 24 hour time) // null AM: [ "AM", "am", "AM"], PM: [ "PM", "pm", "PM"], eras: [ // eras in reverse chronological order. // name: the name of the era in this culture (e.g. A.D., C.E.) // start: when the era starts in ticks (gregorian, gmt), null if it is the earliest supported era. // offset: off set in years from gregorian calendar { "name": "A.D.", "start": null, "offset": 0 } ], twoDigitYearMax: 2029, patterns: { // short date pattern d: "M/d/yyyy", // long date pattern D: "dddd, MMMM dd, yyyy", // short time pattern t: "h:mm tt", // long time pattern T: "h:mm:ss tt", // long date, short time pattern f: "dddd, MMMM dd, yyyy h:mm tt", // long date, long time pattern F: "dddd, MMMM dd, yyyy h:mm:ss tt", // month/day pattern M: "MMMM dd", // month/year pattern Y: "yyyy MMMM", // S is a sortable format that does not vary by culture S: "yyyy\u0027-\u0027MM\u0027-\u0027dd\u0027T\u0027HH\u0027:\u0027mm\u0027:\u0027ss", // formatting of dates in MySQL DataBases ISO: "yyyy-MM-dd hh:mm:ss", ISO2: "yyyy-MM-dd HH:mm:ss", d1: "dd.MM.yyyy", d2: "dd-MM-yyyy", d3: "dd-MMMM-yyyy", d4: "dd-MM-yy", d5: "H:mm", d6: "HH:mm", d7: "HH:mm tt", d8: "dd/MMMM/yyyy", d9: "MMMM-dd", d10: "MM-dd", d11: "MM-dd-yyyy" }, percentSymbol: "%", currencySymbol: "$", currencySymbolposition: "before", decimalSeparator: '.', thousandsSeparator: ',', pagerGoToPagestring: "Go to page:", pagerShowRowsstring: "Show rows:", pagerRangestring: " of ", pagerPreviousButtonstring: "previous", pagerNextButtonstring: "next", pagerFirstButtonsSring: "first", pagerLastButtonstring: "last", filterApplystring: "Apply", filterCancelstring: "Cancel", filterClearstring: "Clear Filter", filterstring: "advanced", filterSearchstring: "Search:", filterstringComparisonOperators: [ 'empty', 'not empty', 'contains', 'contains(match case)', 'does not contain', 'does not contain(match case)', 'starts with', 'starts with(match case)', 'ends with', 'ends with(match case)', 'equal', 'equal(match case)', 'null', 'not null'], filterNumericComparisonOperators: [ 'equal', 'not equal', 'less than', 'less than or equal', 'greater than', 'greater than or equal', 'null', 'not null'], filterDateComparisonOperators: [ 'equal', 'not equal', 'less than', 'less than or equal', 'greater than', 'greater than or equal', 'null', 'not null'], filterbooleanComparisoOoperators: [ 'equal', 'not equal'], validationstring: "Entered value is not valid", emptyDatastring: "No data to display", filterSelectstring: "Select Filter", loadText: "Loading...", clearstring: "Clear", todaystring: "Today", loadingErrorMessage: "The data is still loading and you cannot set a property or call a method. You can do that once the data binding is completed. jqxTreeGrid raises the 'bindingComplete' event when the binding is completed."
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { localization: { pagerGoToPageString: 'Gehe zu:', pagerShowRowsString: 'Zeige Zeile:', pagerRangeString: ' von ', pagerNextButtonString: 'voriger', pagerFirstButtonString: 'first', pagerLastButtonString: 'last', pagerPreviousButtonString: 'nächster' }, source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} localization={this.state.localization} pageable={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
pagerHeight
|
number
|
28
|
Sets or gets the height of the jqxTreeGrid's Pager(s). Pager(s) is(are) displayed after setting pageable to true.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} pageable={true} pagerHeight={35} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
pageSize
|
number
|
10
|
Sets or gets the rows count per page when paging is enabled.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} pageable={true} pageSize={5} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
pageSizeOptions
|
Array<number | string>
|
['5', '10', '20']
|
Sets or gets the jqxTreeGrid's page size options when paging is enabled and the pagerMode property is set to "advanced" .
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} pageable={true} pagerMode={ 'advanced'} pageSizeOptions={['2', '3', '5']} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
pageable
|
boolean
|
false
|
Determines whether the jqxTreeGrid is in paging mode.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} pageable={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
pagerPosition
|
TreeGridPagerPosition
|
"bottom"
|
TreeGridPagerPosition: "top" | "bottom" | "both"
Sets or gets the Pager's position. Possible values: 'top' , 'bottom' and 'both'
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} pageable={true} pagerPosition={ 'top'} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
pagerMode
|
TreeGridPagerMode
|
"default"
|
TreeGridPagerMode: "default" | "advanced"
Sets or gets the Pager's mode. Possible values: "default" and "advanced"
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} pageable={true} pagerMode={ 'advanced'} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
pageSizeMode
|
TreeGridPageSizeMode
|
"default"
|
TreeGridPageSizeMode: "default" | "root"
Sets or gets the Pager Size's mode. Possible values: "default" and "root"
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} pageable={true} pageSizeMode={ 'root'} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
pagerButtonsCount
|
number
|
5
|
Sets or gets the count of the buttons displayed on the Pager when pagerMode is set to "default" .
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} pageable={true} pagerButtonsCount={2} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
pagerRenderer
|
() => any
|
null
|
Enables custom rendering of the Pager.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { pagerRenderer: (): any => { // Do something here and return a HTML Element as a result. }, source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} pageable={true} pagerRenderer={this.state.pagerRenderer} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
ready
|
() => void
|
null
|
Callback function which is called when the jqxTreeGrid is rendered and data binding is completed..
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { ready: (): any => { alert( 'Ready!') }, source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} ready={this.state.ready} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rowDetails
|
boolean
|
false
|
Sets or gets whether the jqxTreeGrid rows have details. See the rowDetailsRenderer for rendering of the row details.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} rowDetails={true} rowDetailsRenderer={this.state.rowDetailsRenderer} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rowDetailsRenderer
|
(key: TreeGridRowDetailsRenderer['key'], dataRow: TreeGridRowDetailsRenderer['dataRow']) => any
|
null
|
Interface TreeGridRowDetailsRenderer { key?: number; dataRow?: number; }
Callback function which is used for rendering of the row's details.
- id/key - row's id/key.
- dataRow - the row as a set of Key/Value pairs.
rowDetailsRenderer
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { rowDetailsRenderer: (key: number, dataRow: number): any => { return 'Record ' + key + ' details'; }, source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} rowDetails={true} rowDetailsRenderer={this.state.rowDetailsRenderer} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
renderToolbar
|
(toolBar?: TreeGridRenderToolbar['toolbar']) => void
|
null
|
Interface TreeGridRenderToolbar { toolbar?: object; }
Enables custom rendering of the Toolbar.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { renderToolbar: (toolbar: object): any => { const container = document.createElement( 'div'); container.innerHTML = 'Some custom HTML here...'; toolbar.append(container); }, source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} renderToolbar={this.state.renderToolbar} showToolbar={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
renderStatusBar
|
(statusBar?: TreeGridRenderStatusBar['statusbar']) => void
|
null
|
Interface TreeGridRenderStatusBar { statusbar?: object; }
Enables custom rendering of the Statusbar.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { renderStatusBar: (statusbar: object): any => { const container = document.createElement( 'div'); container.innerHTML = 'Some custom HTML here...'; statusbar.append(container); }, source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} renderStatusBar={this.state.renderStatusBar} showStatusbar={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rendering
|
() => void
|
null
|
Callback function which is called before the rendering of the jqxTreeGrid's rows.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { rendering: (): any => { alert( 'Rendering!'); }, source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} rendering={this.state.rendering} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rendered
|
() => void
|
null
|
Callback function which is called after the rendering of the jqxTreeGrid's row.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { rendered: (): any => { alert( 'Rendered!'); }, source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} rendered={this.state.rendered} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rtl
|
boolean
|
false
|
Sets or gets a value indicating whether widget's elements are aligned to support locales using right-to-left fonts.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} rtl={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
source
|
any
|
null
|
Determines the jqxTreeGrid's data source. The source property is expected to point to an instance of jqxDataAdapter. For more information about jqxDataAdapter, visit: jquery-data-adapter.htm. To clear the data source, set the source property to null.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
sortable
|
boolean
|
false
|
Enables/Disables the sorting feature.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} sortable={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
showAggregates
|
boolean
|
false
|
Determines whether the jqxTreeGrid's Aggregates bar is visible.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} showAggregates={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
showSubAggregates
|
boolean
|
false
|
Determines whether jqxTreeGrid would calculate summary values for all values within a group of records and would display the result inside footer cell after each group.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} showAggregates={true} showSubAggregates={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
showToolbar
|
boolean
|
false
|
Determines whether the jqxTreeGrid's Toolbar is visible.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} showToolbar={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
showStatusbar
|
boolean
|
false
|
Determines whether the jqxTreeGrid's Statusbar is visible.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} showStatusbar={true} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
statusBarHeight
|
number
|
34
|
Sets or gets the height of the Statusbar. Statusbar is displayed after setting showStatusbar to true.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} statusBarHeight={40} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
scrollBarSize
|
number
|
17
|
Sets or gets the size of the scrollbars.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} scrollBarSize={15} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
selectionMode
|
TreeGridSelectionMode
|
"multipleRows"
|
TreeGridSelectionMode: "multipleRows" | "singleRow" | "custom" | "none"
Sets or gets the selection mode. Possible values: "multipleRows" , "singleRow" and "custom" . In the "custom" mode, rows could be selected/unselected only through the API.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} selectionMode={ 'singleRow'} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
showHeader
|
boolean
|
true
|
Sets or gets the jqxTreeGrid's columns visibility.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} showHeader={false} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
theme
|
string
|
''
|
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} theme={ 'material'} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
toolbarHeight
|
number
|
34
|
Sets or gets the height of the Toolbar. Toolbar is displayed after setting showToolbar to true.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} showToolbar={true} toolbarHeight={40} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
width
|
string | number
|
null
|
Sets or gets the jqxTreeGrid's width.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} width={500} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
virtualModeCreateRecords
|
(expandedRecord?: any, done?: any) => void
|
null
|
By defining that function you can load data into jqxTreeGrid dynamically. For each record only when required, jqxTreeGrid calls virtualModeCreateRecords function and this allows you to provide records on demand. In order to enable the load on demand feature, you should also define the virtualModeRecordCreating function.
- Row Key/ID - unique ID. If null is passed, that the function's result would be the records of the first hierarchy level.
- Done - callback function. Call it when data is loaded and pass the loaded data as an Array.
|
virtualModeRecordCreating
|
(record?: any) => any
|
null
|
By defining that function you can initialize the dynamic data that you load into jqxTreeGrid. In order to enable the load on demand feature, you should also define virtualModeCreateRecords function.
- Row - object with the following reserved members:
- checked - boolean value. Determines the row's checked state.
- expanded - boolean value. Determines the row's expanded state.
- icon - string value. Determines the row's icon url.
- leaf - boolean value. Determines whether the row is a leaf in the hierarchy. When you set
leaf to true, the expand/collapse button would not be displayed.
- level - Integer value. Returns the row's hierarchy level.
- selected - boolean value. Determines the row's selected state.
|
|
bindingComplete
|
Event
|
|
This event is triggered when the jqxTreeGrid binding is completed. *Bind to that event before the jqxTreeGrid's initialization. Otherwise, if you are populating the widget from a local data source and bind to bindingComplete after the initialization, the event could be already raised when you attach an event handler to it.
Code examples
Bind to the bindingComplete event of jqxTreeGrid.
|
cellBeginEdit
|
Event
|
|
This is triggered when a cell edit begins. Note: To turn on cell editing, you should set the editSettings property and make sure that its editSingleCell sub property is set to true .
Code examples
Bind to the cellBeginEdit event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.setOptions({ editable: true, editSettings: { editSingleCell: true, editOnDoubleClick: true } }); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onCellBeginEdit={this.onCellBeginEdit} source={this.state.source} columns={this.state.columns} /> ); } private onCellBeginEdit(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
cellEndEdit
|
Event
|
|
This is triggered when a cell edit ends. Note: To turn on cell editing, you should set the editSettings property and make sure that its editSingleCell sub property is set to true .
Code examples
Bind to the cellEndEdit event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.setOptions({ editable: true, editSettings: { editSingleCell: true, editOnDoubleClick: true, saveOnSelectionChange: true, saveOnEnter: true, saveOnPageChange: true, saveOnBlur: true } }); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onCellEndEdit={this.onCellEndEdit} source={this.state.source} columns={this.state.columns} /> ); } private onCellEndEdit(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
cellValueChanged
|
Event
|
|
This event is triggered when a cell value is changed.
Code examples
Bind to the cellValueChanged event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.setOptions({ editable: true }); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onCellValueChanged={this.onCellValueChanged} source={this.state.source} columns={this.state.columns} /> ); } private onCellValueChanged(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
columnResized
|
Event
|
|
This event is triggered when a column is resized.
Code examples
Bind to the columnResized event of jqxTreeGrid.
|
columnReordered
|
Event
|
|
This event is triggered when the column's order is changed.
Code examples
Bind to the columnReordered event of jqxTreeGrid.
|
filter
|
Event
|
|
This event is triggered when the jqxTreeGrid's rows filter is changed.
Code examples
Bind to the filter event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.setOptions({ filterable: true }); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onFilter={this.onFilter} source={this.state.source} columns={this.state.columns} /> ); } private onFilter(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
pageChanged
|
Event
|
|
This is triggered when the jqxTreeGrid's current page is changed.
Code examples
Bind to the pageChanged event of jqxTreeGrid.
|
pageSizeChanged
|
Event
|
|
This is triggered when the jqxTreeGrid's page size is changed.
Code examples
Bind to the pageSizeChanged event of jqxTreeGrid.
|
rowClick
|
Event
|
|
This is triggered when a row is clicked.
Code examples
Bind to the rowClick event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onRowClick={this.onRowClick} source={this.state.source} columns={this.state.columns} /> ); } private onRowClick(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rowDoubleClick
|
Event
|
|
This is triggered when a row is double-clicked.
Code examples
Bind to the rowDoubleClick event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onRowDoubleClick={this.onRowDoubleClick} source={this.state.source} columns={this.state.columns} /> ); } private onRowDoubleClick(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rowSelect
|
Event
|
|
This is triggered when a row is selected.
Code examples
Bind to the rowSelect event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onRowSelect={this.onRowSelect} source={this.state.source} columns={this.state.columns} /> ); } private onRowSelect(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rowUnselect
|
Event
|
|
This is triggered when a row is unselected.
Code examples
Bind to the rowUnselect event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onRowUnselect={this.onRowUnselect} source={this.state.source} columns={this.state.columns} /> ); } private onRowUnselect(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rowBeginEdit
|
Event
|
|
This is triggered when a row edit begins.
Code examples
Bind to the rowBeginEdit event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.setOptions({ editable: true }); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onRowBeginEdit={this.onRowBeginEdit} source={this.state.source} columns={this.state.columns} /> ); } private onRowBeginEdit(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rowEndEdit
|
Event
|
|
This is triggered when a row edit ends.
Code examples
Bind to the rowEndEdit event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.setOptions({ editable: true }); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onRowEndEdit={this.onRowEndEdit} source={this.state.source} columns={this.state.columns} /> ); } private onRowEndEdit(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rowExpand
|
Event
|
|
This is triggered when a row is expanded.
Code examples
Bind to the rowExpand event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onRowExpand={this.onRowExpand} source={this.state.source} columns={this.state.columns} /> ); } private onRowExpand(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rowCollapse
|
Event
|
|
This is triggered when a row is collapsed.
Code examples
Bind to the rowCollapse event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onRowCollapse={this.onRowCollapse} source={this.state.source} columns={this.state.columns} /> ); } private onRowCollapse(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rowCheck
|
Event
|
|
This is triggered when a row is checked.
Code examples
Bind to the rowCheck event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.setOptions({ checkboxes: true }); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onRowCheck={this.onRowCheck} source={this.state.source} columns={this.state.columns} /> ); } private onRowCheck(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
rowUncheck
|
Event
|
|
This is triggered when a row is unchecked.
Code examples
Bind to the rowUncheck event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.setOptions({ checkboxes: true }); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onRowUncheck={this.onRowUncheck} source={this.state.source} columns={this.state.columns} /> ); } private onRowUncheck(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
sort
|
Event
|
|
This event is triggered when the jqxTreeGrid sort order or sort column is changed.
Code examples
Bind to the sort event of jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.setOptions({ sortable: true }); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} onSort={this.onSort} source={this.state.source} columns={this.state.columns} /> ); } private onSort(e: Event): void { alert( 'do something...'); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
|
Name | Arguments | Return Type |
addRow
|
rowKey, rowData, rowPosition, parent
|
|
Adds a new row. For synchronization with a server, please look also the jqxDataAdapter plug-in's help documentation.
- Row Key/ID - unique ID which identifies the row. If null is passed, the jqxTreeGrid will generate an unique.
- Row Data - object with Key/Value pairs. To add an empty row, pass {}.
- Row Position - string with two possible values - "last" and "first". By default "last" is used.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.addRow(10,{}, 'first'); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
addFilter
|
dataField, filerGroup
|
|
|
applyFilters
|
None
|
|
Applies the added/removed filters.
|
beginUpdate
|
None
|
|
Begins an update and stops all refreshes.
|
beginRowEdit
|
rowKey
|
|
Begins a row edit operation when editable is set to true.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.beginRowEdit(8); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
beginCellEdit
|
rowKey, dataField
|
|
Begins a cell edit operation when editable is set to true.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.beginCellEdit(8, 'firstName'); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
clearSelection
|
None
|
|
|
clearFilters
|
None
|
|
|
clear
|
None
|
|
Clears the jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.clear(); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
checkRow
|
rowKey
|
|
Checks a row when checkboxes is set to true.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.checkRow(8); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
collapseRow
|
rowKey
|
|
Collapses a row.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.collapseRow(5); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
collapseAll
|
None
|
|
Collapses all rows.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.collapseAll(); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
destroy
|
None
|
|
Destroys jqxTreeGrid and removes it from the DOM.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.destroy(); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
deleteRow
|
rowKey
|
|
Deletes a row. For synchronization with a server, please look also the jqxDataAdapter plug-in's help documentation.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.deleteRow(7); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
expandRow
|
rowKey
|
|
|
expandAll
|
None
|
|
|
endUpdate
|
None
|
|
Ends the update and resumes all refreshes.
|
ensureRowVisible
|
rowKey
|
|
Moves the vertical scrollbar to a row.
|
endRowEdit
|
rowKey, cancelChanges
|
|
Ends a row edit when editable is set to true.
|
endCellEdit
|
rowKey, dataField, cancelChanges
|
|
Ends a cell edit operation when editable is set to true.
|
exportData
|
exportDataType
|
|
Exports TreeGrid Data to Excel, HTML, XML, JSON, CSV or TSV. See also the exportSettings property
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.exportData( 'pdf'); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
focus
|
None
|
|
Focus jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.focus(); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
getColumnProperty
|
dataField, propertyName
|
|
Gets a property value of a column.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.getColumnProperty( 'firstName','width'); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
goToPage
|
pageIndex
|
|
Navigates to a page when pageable is set to true.
|
goToPrevPage
|
None
|
|
Navigates to a previous page when pageable is set to true.
|
goToNextPage
|
None
|
|
Navigates to a next page when pageable is set to true.
|
getSelection
|
None
|
|
Returns an array of selected rows.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.getSelection(); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
getKey
|
row
|
|
Returns the Row's Key. If the row's key is not found, returns null.
|
getRow
|
rowKey
|
|
Returns an object. If the row is not found, returns null.
- checked - boolean value. Returns the row's checked state.
- expanded - boolean value. Returns the row's expanded state.
- icon - string value. Returns the row's icon url.
- leaf - boolean value. Returns whether the row is a leaf in the hierarchy.
- level - Integer value. Returns the row's hierarchy level.
- parent - object. Returns null for root rows. Otherwise, returns the parent row's object
- records - Array. Returns the row's sub-rows collection.
- selected - boolean value. Returns the row's selected state.
- uid - number/string value. Returns the row's unique ID/Key.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.getRow(2); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
getRows
|
None
|
|
Returns an array of all rows loaded into jqxTreeGrid.
- checked - boolean value. Returns the row's checked state.
- expanded - boolean value. Returns the row's expanded state.
- icon - string value. Returns the row's icon url.
- leaf - boolean value. Returns whether the row is a leaf in the hierarchy.
- level - Integer value. Returns the row's hierarchy level.
- parent - object. Returns null for root rows. Otherwise, returns the parent row's object
- records - Array. Returns the row's sub-rows collection.
- selected - boolean value. Returns the row's selected state.
- uid - number/string value. Returns the row's unique ID/Key.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.getRows(); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
getCheckedRows
|
None
|
|
Returns a flat array of all checked rows.
- checked - boolean value. Returns the row's checked state.
- expanded - boolean value. Returns the row's expanded state.
- icon - string value. Returns the row's icon url.
- leaf - boolean value. Returns whether the row is a leaf in the hierarchy.
- level - Integer value. Returns the row's hierarchy level.
- parent - object. Returns null for root rows. Otherwise, returns the parent row's object
- records - Array. Returns the row's sub-rows collection.
- selected - boolean value. Returns the row's selected state.
- uid - number/string value. Returns the row's unique ID/Key.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.getCheckedRows(); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
getView
|
None
|
|
Returns an array of all rows loaded into jqxTreeGrid. The method takes into account the applied Filtering and Sorting.
- checked - boolean value. Returns the row's checked state.
- expanded - boolean value. Returns the row's expanded state.
- icon - string value. Returns the row's icon url.
- leaf - boolean value. Returns whether the row is a leaf in the hierarchy.
- level - Integer value. Returns the row's hierarchy level.
- parent - object. Returns null for root rows. Otherwise, returns the parent row's object
- records - Array. Returns the row's sub-rows collection.
- selected - boolean value. Returns the row's selected state.
- uid - number/string value. Returns the row's unique ID/Key.
|
getCellValue
|
rowKey, dataField
|
|
Returns a value of a cell.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.getCellValue(2, 'FirstName'); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
hideColumn
|
dataField
|
|
Hides a column.
- data field - column's data field.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.hideColumn( 'FirstName'); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
isBindingCompleted
|
None
|
|
Returns whether the binding is completed and if the result is true, this means that you can invoke methods and set properties. Otherwise, if the binding is not completed and you try to set a property or invoke a method, the widget will throw an exception.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.isBindingCompleted(); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
lockRow
|
rowKey
|
|
Locks a row i.e editing of the row would be disabled.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.lockRow(2); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
refresh
|
None
|
|
Performs a layout and updates the HTML elements position and size.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.refresh(); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
render
|
None
|
|
Renders jqxTreeGrid.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.render(); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
removeFilter
|
dataField
|
|
Removes a filter.
- data field - column's data field.
|
scrollOffset
|
top, left
|
|
Scrolls to a position or gets the scroll position.
|
setColumnProperty
|
dataField, propertyName, propertyValue
|
|
Sets a property of a column. See the columns property for more information.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.setColumnProperty( 'FirstName','text','New Text'); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
showColumn
|
dataField
|
|
|
selectRow
|
rowId
|
|
Selects a row.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.selectRow(2); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
setCellValue
|
rowId, dataField, cellValue
|
|
Sets a value of a cell.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.setCellValue(2, 'FirstName','New Value'); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
sortBy
|
dataField, sortOrder
|
|
Sorts a column, if sortable is set to true.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.sortBy( 'FirstName','asc'); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
updating
|
None
|
|
Gets a boolean value which determines whether jqxTreeGrid is in update state i.e the beginUpdate method was called and the endUpdate method is not called yet.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.updating(); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
updateBoundData
|
None
|
|
Performs a data bind and updates jqxTreeGrid with the new data.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.updateBoundData(); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
unselectRow
|
rowId
|
|
Unselects a row.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.unselectRow(2); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
uncheckRow
|
rowId
|
|
Unchecks a row when checkboxes is set to true.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.uncheckRow(2); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
updateRow
|
rowId, data
|
|
Updates the row's data. For synchronization with a server, please look also the jqxDataAdapter plug-in's help documentation.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.updateRow(2,{FirstName: 'Nancy', LastName: 'Davolio'}); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|
unlockRow
|
rowId
|
|
Unlocks a row.
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxTreeGrid, { ITreeGridProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxtreegrid'; class App extends React.PureComponent<{}, ITreeGridProps> { private myTreeGrid = React.createRef<JqxTreeGrid>(); constructor(props: {}) { super(props); let employees = [{ 'EmployeeID': 2, 'FirstName': 'Andrew', 'LastName': 'Fuller', 'Title': 'Vice President, Sales', 'expanded': 'true', children: [{ 'EmployeeID': 8, 'FirstName': 'Laura', 'LastName': 'Callahan', 'Title': 'Inside Sales Coordinator' }, { 'EmployeeID': 5, 'FirstName': 'Steven', 'LastName': 'Buchanan', 'Title': 'Sales Manager', 'expanded': 'true', children: [{ 'EmployeeID': 6, 'FirstName': 'Michael', 'LastName': 'Suyama', 'Title': 'Sales Representative' }, { 'EmployeeID': 7, 'FirstName': 'Robert', 'LastName': 'King', 'Title': 'Sales Representative' }] }] }]; const data = { dataType: "json", dataFields: [{ name: 'EmployeeID', type: 'number' }, { name: 'FirstName', type: 'string' }, { name: 'LastName', type: 'string' }, { name: 'Title', type: 'string' }, { name: 'children', type: 'array' }, { name: 'expanded', type: 'bool' }], hierarchy: { root: 'children' }, id: 'EmployeeID', localData: employees }; this.state = { source: new jqx.dataAdapter(data), columns: [ { text: 'FirstName', dataField: 'FirstName', width: 150, aggregates: ['count'] }, { text: 'LastName', dataField: 'LastName', width: 120 }, { text: 'Title', dataField: 'Title', width: 200 } ] } } public componentDidMount(): void { this.myTreeGrid.current!.unlockRow(2); } public render() { return ( <JqxTreeGrid ref={this.myTreeGrid} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render( <App />, document.querySelector( '#app') as HTMLElement);
|