Created
August 9, 2019 09:47
-
-
Save ShanikaNishadhi/0431ae7946142bae407bf23f89fed687 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public render() { | |
return ( | |
<div> | |
<JqxGrid onCellbeginedit={this.cellBeginEditEvent} onCellendedit={this.cellEndEditEvent} | |
// @ts-ignore | |
width={getWidth('grid')} source={this.state.source} columns={this.state.columns} | |
editable={true} enabletooltips={true} selectionmode={'multiplecellsadvanced'} /> | |
<div style={{ fontSize: '12px', fontFamily: 'Verdana', marginTop: '30px' }}> | |
<div ref={this.beginEdit} /> | |
<div ref={this.endEdit} style={{ marginTop: '10px' }} /> | |
</div> | |
</div> | |
); | |
} | |
private cellBeginEditEvent(event: any): void { | |
const args = event.args; | |
this.beginEdit.current!.innerHTML = 'Event Type: cellbeginedit, Column: ' + args.datafield + ', Row: ' + (1 + args.rowindex) + ', Value: ' + args.value; | |
} | |
private cellEndEditEvent(event: any): void { | |
const args = event.args; | |
this.endEdit.current!.innerHTML = 'Event Type: cellendedit, Column: ' + args.datafield + ', Row: ' + (1 + args.rowindex) + ', Value: ' + args.value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment