Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146798 | Aug 20,2019 02:32 PM UTC | Aug 27,2019 02:18 PM UTC | React - EJ 2 | 3 |
![]() |
Tags: Grid |
Hi
I’m facing an issue using the Syncfusion examples of the GridComponent of
React, if added more columns to the table, the horizontal the scrolling appears,
which is fine the problem is after scrolling the table to the right, when I try
to edit a column the focus comes back to the initial position of the table.
Do you have any suggestions to fix this behaviour?
[index.js]
export class NormalEdit extends SampleBase {
constructor() {
. . . .
this.focusIndex = null;
}
actionBegin(args) {
if (args.requestType == "beginEdit") {
this.focusIndex = document.activeElement.cellIndex;
}
. . . .
}
actionComplete(args) {
if (args.requestType == "beginEdit") {
args.row.querySelector('#' + this.gridInstance.element.id + this.gridInstance.columns[this.focusIndex].field).select();
}
}
render() {
return (<div className='control-pane'>
<div className='control-section'>
<div className='col-md-9'>
<GridComponent dataSource={orderDataSource} width={400} actionComplete={this.actionComplete.bind(this)} ref={grid => this.gridInstance = grid} toolbar={this.toolbarOptions} allowPaging={true} editSettings={this.editSettings} pageSettings={this.pageSettings} actionBegin={this.actionBegin.bind(this)}>
<Inject services={[Page, Toolbar, Edit]} />
</GridComponent>
</div> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.