ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: Bohuslav Stanek on July 03, 2017, 12:03:05 pm

Title: Focus during editing of two tables
Post by: Bohuslav Stanek on July 03, 2017, 12:03:05 pm
Hi,
we have problem during editing two tables. If I click to second table and start to write, previous cell in first table is stil active.
See video http://take.ms/XfCp8 (http://take.ms/XfCp8) and example in jsfiddle http://jsfiddle.net/46bcLvgu/1/ (http://jsfiddle.net/46bcLvgu/1/).
Is possible correct this by configuration of pqgrid?
Title: Re: Focus during editing of two tables
Post by: paramvir on July 03, 2017, 12:26:23 pm
Same configuration options can't be shared with 2 or more grids, every grid needs to have its own copy of options.

http://jsfiddle.net/46bcLvgu/2/
Title: Re: Focus during editing of two tables
Post by: Bohuslav Stanek on July 03, 2017, 12:50:58 pm
Same problem with text input. http://jsfiddle.net/46bcLvgu/3/
Title: Re: Focus during editing of two tables
Post by: Bohuslav Stanek on July 03, 2017, 12:59:45 pm
Problem is not in editing same data. I used wrong code before. My mistake.
We have problem in loosing of focus of edited cell. We must click twice on element out of table to set focus on it. During debuging I see, that first click close editor and set focus to edited cell. Second click finally set focus on desired element.
Title: Re: Focus during editing of two tables
Post by: paramvir on July 03, 2017, 01:21:00 pm
Ok, I got it, set focus to other control seems to be an issue.

editModel:{clicksToEdit: 1} fixes the issue between the grids:

http://jsfiddle.net/46bcLvgu/4/