import * as React from 'react'; import JqxDataTable, { IDataTableProps, jqx } from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdatatable'; class App extends React.PureComponent<{}, IDataTableProps> { private myDataTable = React.createRef(); constructor(props: {}) { super(props); this.tableOnBindingComplete = this.tableOnBindingComplete.bind(this); const source = { dataFields: [ { name: 'OrderID', type: 'int' }, { name: 'Freight', type: 'float' }, { name: 'ShipName', type: 'string' }, { name: 'ShipAddress', type: 'string' }, { name: 'ShipCity', type: 'string' }, { name: 'ShipCountry', type: 'string' }, { name: 'ShippedDate', type: 'date' } ], dataType: 'xml', id: 'OrderID', record: 'Order', root: 'Orders', url: 'orderdetails.xml' }; this.state = { columns: [ { text: 'Order ID', editable: false, dataField: 'OrderID', width: 250 }, { text: 'Freight', dataField: 'Freight', cellsFormat: 'f2', cellsAlign: 'right', align: 'right', width: 250 }, { text: 'Ship Country', dataField: 'ShipCountry', width: 150 }, { text: 'Shipped Date', dataField: 'ShippedDate', cellsAlign: 'right', align: 'right', cellsFormat: 'dd/MM/yyyy' } ], source: new jqx.dataAdapter(source) }; } public render() { return ( ); } private tableOnBindingComplete(): void { this.myDataTable.current!.beginUpdate(); this.myDataTable.current!.lockRow(1); this.myDataTable.current!.lockRow(3); this.myDataTable.current!.lockRow(5); this.myDataTable.current!.endUpdate(); } } export default App;