Name | Type | Default |
---|---|---|
altRows | boolean | false |
Sets or gets whether the jqxDataTable 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 jqxDataTable 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={450} source={this.state.source} columns={this.state.columns} autoRowHeight={true} /> ); } } 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 |
||
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} autoShowLoadElement={false} /> ); } } 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} columnsHeight={20} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
columns | Array<DataTableColumns> | [] |
DataTableColumnFormat: "d2" | "n2" | "f2" | "f5" | "c2" | "f" | "n" | "c" | "p" | "d" | "dd" | "ddd" | "dddd" | "D" | "h" | "hh" | "H" | "HH" | "m" | "mm" | "M" | "MM" | "MMM" | "MMMM" | "s" | "ss" | "t" | "tt" | "y" | "yy" | "yyy" | "yyyy" | "dd/MM/yyyy" | "yyyy-MM-dd"
DataTableColumnsAlign: "left" | "right" | "center" Interface DataTableColumns { text?: string; dataField?: string; displayField?: string; sortable?: boolean; filterable?: boolean; hidden?: boolean; columnGroup ?: string; autoCellHeight?: boolean; renderer?: (text:string, align?:string, height?: string | number) => string; rendered?: (element:any, align?:string, height?: string | number) => boolean; cellsRenderer?: (row:number, column?:any, value?: any, rowData?:any) => string; columnType?: string; validation?: (cell:number, value?:any) => any; initEditor?: (row:number, cellValue?:any, editor?:any, cellText?:string, width?:string | number, height?:string | number) => void; createEditor?: (row:number, cellValue?:any, editor?:any, cellText?:string, width?:string | number, height?:string | number) => void; getEditorValue?: (row:number, cellValue?:any, editor?:any) => void; cellsFormat?: DataTableColumnFormat; aggregates?: Array<any>; aggregatesRenderer?: (aggregates: Array<any>, column: any, element: any) => string[] | string; align?: DataTableColumnsAlign; cellsAlign?: DataTableColumnsAlign; width?: number | string; minWidth?: number | string; maxWidth?: number | string; resizable?: boolean; draggable?: boolean; editable?: boolean; className?: string; cellClassName?: any; pinned?: boolean; } Sets the jqxDataTable's columns.
|
||
columnGroups | Array<DataTableColumnGroups> | [] |
Interface DataTableColumnGroups {
text?: string; parentGroup?: string; align?: string; name?: string; } Sets the jqxDataTable's column groups.
|
||
columnsResize | boolean | false |
Sets or gets the jqxDataTable's columnsResize. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 jqxDataTable's columnsReorder. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 jqxDataTable is disabled. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 jqxDataTable 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} editable={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
editSettings | DataTableEditSettings | { saveOnPageChange: true, saveOnBlur: true, saveOnSelectionChange: true, cancelOnEsc: true, saveOnEnter: true, editSingleCell: false, editOnDoubleClick: true, editOnF2: true } |
Interface DataTableEditSettings {
saveOnPageChange?: boolean; saveOnBlur?: boolean; saveOnSelectionChange?: boolean; cancelOnEsc?: boolean; saveOnEnter?: boolean; editSingleCell?: boolean; editOnDoubleClick?: boolean; editOnF2?: boolean; } Sets or gets the jqxDataTable'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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { editSettings: { saveOnPageChange: true, saveOnBlur: true, saveOnSelectionChange: false, cancelOnEsc: true, saveOnEnter: true, editSingleCell: false, editOnDoubleClick: true, editOnF2: true }, editable: true, source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} editSettings={this.state.editSettings} editable={this.state.editable} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
exportSettings | DataTableExportSettings | { columnsHeader: true, hiddenColumns: false, serverURL: null, characterSet: null, recordsInView: true, fileName: "jqxDataTable"} |
Interface DataTableExportSettings {
columnsHeader?: boolean; hiddenColumns?: boolean; serverURL?: any; characterSet?: any; recordsInView?: boolean; fileName?: string | null; } Determines the Data Export settings used by jqxDataTable when
|
||
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} enableHover={true} /> ); } } 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} filterHeight={35} filterable={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
filterMode | DataTableFilterMode | "default" |
DataTableFilterMode: "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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} filterable={true} filterMode={'advanced'} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
groups | Array<any> | [] |
Sets or gets the jqxDataTable's data groups. Set this property if you want to display the data grouped by a set of column(s). /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} groups={['Country']} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
groupsRenderer | (value?:DataTableGroupsRenderer['value'], rowData?:DataTableGroupsRenderer['rowdata'], level?:DataTableGroupsRenderer['level']) => string | null |
Interface DataTableGroupsRenderer {
value?: string; rowdata?: object; level?: number; } Callback function which allows you to customize the rendering of the group headers. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { groupsRenderer: (value: string, rowdata: object, level: number): any => { return 'First Name: ' + value; }, source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} groupsRenderer={this.state.groupsRenderer} groups={['ContactName']} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
height | number | string | null |
Sets or gets the jqxDataTable's height. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} height={350} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
initRowDetails | (id?:DataTableInitRowDetails['id'], row?:DataTableInitRowDetails['row'], element?:DataTableInitRowDetails['element'], rowInfo?:DataTableInitRowDetails['rowinfo']) => void | null |
Interface DataTableInitRowDetails {
id?: number; row?: number; element?: object; rowinfo?: object; } Callback function which is used for initialization of the expanded row's details. The function is called just once when the row is expanded for first time.
initRowDetails
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { initRowDetails: (id: number, row: number, element: object, rowinfo: object): any => { const container = document.createElement('div'); container.innerHTML = 'Some Details...' element[0].appendChild(container); }, source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} initRowDetails={this.state.initRowDetails} rowDetails={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} incrementalSearch={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
localization | any | default localization strings. |
Applies a localization to the jqxDataTable's strings. Default localization object:{ /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { localization: { pagerGoToPageString: 'Gehe zu:', pagerShowRowsString: 'Zeige Zeile:', pagerRangeString: ' von ', pagerNextButtonString: 'voriger', pagerFirstButtonString: 'first', pagerLastButtonString: 'last', pagerPreviousButtonString: 'nächster' }, source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 jqxDataTable'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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} pagerHeight={35} pageable={true} /> ); } } 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} pageSize={15} pageable={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
pageSizeOptions | Array<string | number> | ['5', '10', '20'] |
Sets or gets the jqxDataTable'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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} pageSizeOptions={[15, 25, 35]} pageable={true} pagerMode={'advanced'} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
pageable | boolean | false |
Determines whether the jqxDataTable 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} pageable={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
pagerPosition | DataTablePagerPosition | "bottom" |
DataTablePagerPosition: "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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} pagerPosition={'top'} pageable={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
pagerMode | DataTablePagerMode | "default" |
DataTablePagerMode: "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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} pagerMode={'advanced'} pageable={true} /> ); } } 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} pagerButtonsCount={10} pageable={true} /> ); } } 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { pagerRenderer: (): any => { // Do something here and return a HTML Element as a result. }, source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} pagerRenderer={this.state.pagerRenderer} pageable={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
ready | () => void | null |
Callback function which is called when the jqxDataTable 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { ready: (): any => { alert('Ready!') }, source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 jqxDataTable rows have details and can be expanded/collapsed. See the |
||
renderToolbar | (toolbar?:DataTableRenderToolbar['toolbar']) => void | null |
Interface DataTableRenderToolbar {
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { renderToolbar: (toolbar: object): any => { const container = document.createElement('div'); container.innerHTML = 'Some custom HTML here...'; toolbar.append(container); }, source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} renderToolbar={this.state.renderToolbar} showToolbar={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
renderStatusBar | (statusbar?:DataTableRenderStatusBar['statusbar']) => void | null |
Interface DataTableRenderStatusBar {
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { renderStatusBar: (statusbar: object): any => { const container = document.createElement('div'); container.innerHTML = 'Some custom HTML here...'; toolbar.append(container); }, source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 jqxDataTable's rows. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { rendering: (): any => { alert('Rendering!'); }, source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 jqxDataTable's row. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { rendered: (): any => { alert('Rendered!'); }, source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} rtl={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
source | any | null |
Determines the jqxDataTable'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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} sortable={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
showAggregates | boolean | false |
Determines whether the jqxDataTable's Aggregates bar is visible. |
||
showToolbar | boolean | false |
Determines whether the jqxDataTable'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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} showToolbar={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
showStatusbar | boolean | false |
Determines whether the jqxDataTable'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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} statusBarHeight={40} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
scrollBarSize | number | string | 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} scrollBarSize={20} height={100} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
selectionMode | DataTableSelectionMode | "multipleRows" |
DataTableSelectionMode: "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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} selectionMode={'singleRow'} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
serverProcessing | boolean | false |
Sets or gets whether the Paging, Sorting and Filtering are handled by a Server and jqxDataTable sends Ajax requests to a Server and displays the returned data. When the current page, page size, sort order or sort column is changed, jqxDataTable will automatically perform a new data binding with the updated parameters. For server synchronization after adding, removing, updating rows, see the
/* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} serverProcessing={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
showHeader | boolean | true |
Sets or gets the jqxDataTable'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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} toolbarHeight={40} showToolbar={true} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
width | string | number | null |
Sets or gets the jqxDataTable's width. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
Events |
||
bindingComplete | Event | |
This event is triggered when the jqxDataTable binding is completed. *Bind to that event before the jqxDataTable'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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.setOptions({ editable: true, editSettings: { saveOnPageChange: true, saveOnBlur: true, saveOnSelectionChange: true, cancelOnEsc: true, saveOnEnter: true, editOnDoubleClick: true, editOnF2: true, editSingleCell: true } }); } public render() { return ( <JqxDataTable ref={this.myDataTable} onCellBeginEdit={this.onCellBeginEdit} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.setOptions({ editable: true, editSettings: { saveOnPageChange: true, saveOnBlur: true, saveOnSelectionChange: true, cancelOnEsc: true, saveOnEnter: true, editOnDoubleClick: true, editOnF2: true, editSingleCell: true } }); } public render() { return ( <JqxDataTable ref={this.myDataTable} onCellEndEdit={this.onCellEndEdit} width={850} 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
|
||
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
|
||
sort | Event | |
This event is triggered when the jqxDataTable 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.setOptions({ sortable: true }); } public render() { return ( <JqxDataTable ref={this.myDataTable} onSort={this.onSort} width={850} source={this.state.source} columns={this.state.columns} /> ); } private onSort(e: Event): void { alert('do something...'); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
filter | Event | |
This event is triggered when the jqxDataTable'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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.setOptions({ filterable: true }); } public render() { return ( <JqxDataTable ref={this.myDataTable} onFilter={this.onFilter} width={850} 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 jqxDataTable's current page is changed. Code examples
Bind to the
|
||
pageSizeChanged | Event | |
This is triggered when the jqxDataTable's page size 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.setOptions({ pageable: true, pagerMode: 'advanced', pageSizeOptions: [2, 4, 8] }); } public render() { return ( <JqxDataTable ref={this.myDataTable} onPageSizeChanged={this.onPageSizeChanged} width={850} source={this.state.source} columns={this.state.columns} /> ); } private onPageSizeChanged(e: Event): void { alert('do something...'); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} onRowClick={this.onRowClick} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} onRowDoubleClick={this.onRowDoubleClick} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} onRowSelect={this.onRowSelect} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public render() { return ( <JqxDataTable ref={this.myDataTable} onRowUnselect={this.onRowUnselect} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.setOptions({ editable: true }); } public render() { return ( <JqxDataTable ref={this.myDataTable} onRowBeginEdit={this.onRowBeginEdit} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.setOptions({ editable: true }); } public render() { return ( <JqxDataTable ref={this.myDataTable} onRowEndEdit={this.onRowEndEdit} width={850} 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
|
||
rowCollapse | Event | |
This is triggered when a row is collapsed. Code examples
Bind to the
|
||
Methods |
||
Name | Arguments | Return Type |
addRow | rowIndex, rowData, rowPosition | |
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.addRow(null,{ 'ContactName': 'Added Name', 'Title': 'Added Title', 'City': 'Added City', 'Country': 'Added Country' },'first'); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.beginUpdate(); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
beginRowEdit | rowIndex | |
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.beginRowEdit(0); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
beginCellEdit | rowIndex, 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.beginCellEdit(0,'ContactName'); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
clearSelection | None | |
Clears the selection. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.clearSelection(); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
clearFilters | None | |
Clears the filters. |
||
clear | None | |
Clears the jqxDataTable. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.clear(); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
destroy | None | |
Destroys jqxDataTable 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.destroy(); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
deleteRow | rowIndex | |
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.deleteRow(0); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
endUpdate | None | |
Ends the update and resumes all refreshes. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.endUpdate(); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
ensureRowVisible | rowIndex | |
Moves the vertical scrollbar to a row index. |
||
endRowEdit | rowIndex, cancelChanges | |
Ends a row edit when /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.endRowEdit(0,true); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
endCellEdit | rowIndex, dataField | |
Ends a cell edit operation when |
||
exportData | exportDataType | |
Exports jqxDataTable's 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.exportData('xls'); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
focus | None | |
Focus jqxDataTable. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.focus(); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.getColumnProperty('ContactName','width'); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.getSelection(); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 in the widget. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.getRows(); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
getView | None | |
Returns an array of all rows displayed in the view. This method takes into account the Sorting Order and returns the Filtered Set of Rows, if Filtering is applied. The method is different from getRows, because getRows returns a Rows array in their data binding order and that array is not affected by filtering and sorting. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.getView(); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
getCellValue | rowIndex, 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.getCellValue(1,'ContactName'); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.hideColumn('ContactName'); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
hideDetails | rowIndex | |
Hides the details of a row. |
||
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.isBindingCompleted(); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
lockRow | rowIndex | |
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.lockRow(0); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.refresh(); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
render | None | |
Renders jqxDataTable. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.render(); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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. /* tslint:disable */ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import 'jqwidgets-scripts/jqwidgets/styles/jqx.base.css'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.scrollOffset(10,0); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.setColumnProperty('ContactName','hidden',true); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
showColumn | dataField | |
Shows a column. |
||
selectRow | rowIndex | |
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.selectRow(1); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
showDetails | rowIndex | |
Shows a row details. |
||
setCellValue | rowIndex, dataField, value | |
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.setCellValue(1,'ContactName','New Value'); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.sortBy('ContactName','asc'); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} 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 jqxDataTable 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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.updating(); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
updateBoundData | None | |
Performs a data bind and updates jqxDataTable with the new data. |
||
unselectRow | rowIndex | |
Unselects a row. |
||
updateRow | rowIndex, rowData | |
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 JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef<JqxDataTable>(); constructor(props: {}) { super(props); const source = { localdata: [ [ 'Maria Anders', 'Sales Representative', 'Berlin', 'Germany' ], [ 'Ana Trujillo', 'Owner', 'Mxico D.F.', 'Mexico' ], [ 'Antonio Moreno', 'Owner', 'Mxico D.F.', 'Mexico' ] ], dataFields: [ { name: 'ContactName', type: 'string', map: '0' }, { name: 'Title', type: 'string', map: '1' }, { name: 'City', type: 'string', map: '2' }, { name: 'Country', type: 'string', map: '3' } ], datatype: 'array' }; this.state = { source: new jqx.dataAdapter(source), columns: [ { text: 'Contact Name', dataField: 'ContactName' }, { text: 'Contact Title', dataField: 'Title' }, { text: 'City', dataField: 'City' }, { text: 'Country', dataField: 'Country' } ] } } public componentDidMount(): void { this.myDataTable.current!.updateRow(1,{}); } public render() { return ( <JqxDataTable ref={this.myDataTable} width={850} source={this.state.source} columns={this.state.columns} /> ); } } ReactDOM.render(<App />, document.querySelector('#app') as HTMLElement); |
||
unlockRow | rowIndex | |
Unlocks a row. |