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 /* 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.
/* 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.
|
||
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
/* 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: /* 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. { /* 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 /* 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 /* 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: /* 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: /* 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: /* 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 /* 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 /* 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.
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 /* 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 /* 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: /* 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 /* 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
|
||
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
|
||
Events |
||
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 Code examples
Bind to the
|
||
cellBeginEdit | Event | |
This is triggered when a cell edit begins. Note: To turn on cell editing, you should set the Code examples
Bind to the
/* 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 Code examples
Bind to the
/* 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
/* 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
|
||
columnReordered | Event | |
This event is triggered when the column's order is changed. Code examples
Bind to the
|
||
filter | Event | |
This event is triggered when the jqxTreeGrid's rows filter is changed. Code examples
Bind to the
/* 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
|
||
pageSizeChanged | Event | |
This is triggered when the jqxTreeGrid's page size is changed. Code examples
Bind to the
|
||
rowClick | Event | |
This is triggered when a row is clicked. Code examples
Bind to the
/* 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
/* 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
/* 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
/* 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
/* 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
/* 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
/* 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
/* 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
/* 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
/* 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
/* 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); |
||
Methods |
||
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.
/* 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 | |
Adds a new filter. |
||
applyFilters | None | |
Applies the added/removed filters. |
||
beginUpdate | None | |
Begins an update and stops all refreshes. |
||
beginRowEdit | rowKey | |
Begins a row edit operation when /* 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 /* 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 | |
Clears the selection. |
||
clearFilters | None | |
Clears the filters. |
||
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 /* 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 | |
Expands a row. |
||
expandAll | None | |
Expands all rows. |
||
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 |
||
endCellEdit | rowKey, dataField, cancelChanges | |
Ends a cell edit operation when |
||
exportData | exportDataType | |
Exports TreeGrid Data to Excel, HTML, XML, JSON, CSV or TSV. See also the /* 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 |
||
goToPrevPage | None | |
Navigates to a previous page when |
||
goToNextPage | None | |
Navigates to a next page when |
||
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.
/* 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.
/* 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.
/* 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.
|
||
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.
/* 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.
|
||
scrollOffset | top, left | |
Scrolls to a position or gets the scroll position. |
||
setColumnProperty | dataField, propertyName, propertyValue | |
Sets a property of a column. See the /* 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 | |
Shows a column. |
||
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 /* 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 /* 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 /* 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); |