jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Edit disabled out of grid mouse focus
Tagged: focus jqxgrid
This topic contains 8 replies, has 2 voices, and was last updated by Martin 5 years, 7 months ago.
-
Author
-
Hi,
I implemented a jqxgrid but I have a problem.
When my mouse focus is out of grid, i can’t edit the cells. If my mouse focus is on grid, i can modify all fields.
Could you help me to find the solution of my problem?Best regards,
Giammarco
Update.
If i insert one grid in page all is right.
When i insert a second grid, doesn’t work.Hello giammarco88,
Could you send us a jsfiddle/codepen example where we could test and investigate this behavior?
Thank you!Best Regards,
MartinjQWidgets Team
https://www.jqwidgets.com/Hi Martin,
you will find an example file here:https://drive.google.com/open?id=1BBpsHAb7kn4EEOfM3-i006EWkiJJwVCm
We try to use two grid in one homepage but there is a problem: we try to write in an edit column but when the mouse is positioned in the other grid, we can’t write anything (we can navigate the homepage but can’t write).
We try to do this:• Selected one cell in upper grid
• Move the mouse in the bottom grid
• Try to write in upper gridBest regards,
Giammarco Bergantino
Hello Giammarco,
Thank you for the example!
You could bind to the
mouseleave
event of the grids and call thefocus
method if there is a selection:$("#grid1").on('mouseleave', (event) => { if ($("#grid1").jqxGrid('getselectedcells').length > 0) { $("#grid1").jqxGrid('focus'); } });
Here is your Example updated.
Best Regards,
MartinjQWidgets Team
https://www.jqwidgets.com/Thank you Martin,
your modify works.
We have another question:http://jsfiddle.net/Cala86/uqnk3hb9/3/
In this example, the grid works, but if you do:
1- Select cell of prices, it is read only, and when is selected try to write a number or letter (example 5)
2- Select an edit cell, like “Name”When the cell is in edit mode, you find the value that you wrote in point 1 (example 5).
Best regards,
Giammarco
Hello Giammarco,
Thank you for the feedback! I will create a work item for this case.
I would like to suggest you a workaround by binding to the
cellbeginedit
event and updating the value of the input to be the value of the cell.
Here is an Example.Best Regards,
MartinjQWidgets Team
https://www.jqwidgets.com/Hi Martin,
thanks for your reply.
You workaround works, but in our case, we can’t use.
If you navigate with keyboard arrows, and you want change a value in “name” cell, when you try insert a letter, like “a”, you must push 2 times the key “a”.1- Select a cell that you want to modify with single click (ex. NAME)
2- Push a letter on keyboard (Ex. a)The cell should change value with letter “a”, but in this case, enter in “edit mode” with old value.
Have you got a solution?
Best regards,
Giammarco
Hello Giammarco,
Please, take a look at this Example.
I’ve added a flag which shows, if the cell editing began with a key pressed or by a click and update its value only in the second case.Best Regards,
MartinjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.