jQWidgets Forums
jQuery UI Widgets › Forums › Grid › jqxgrid problem with createeditor
Tagged: jqxgrid createeditor jqxinput
This topic contains 8 replies, has 2 voices, and was last updated by dmesabar 5 years ago.
-
Author
-
Hi,
When one cell have the functioncreateeditor
dont have the same comportament to edit the cell.
See the example
When you go to cell quantity and start to write, the first number that you wrote aren’t not put into the cell.
Unit price and total working because dont have the functioncreateeditor
.
How can resolve?
ThanksHello dmesabar,
Please, try to set the
columntype: "numberinput"
member for this column.
I hope this will help.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comHi Hristo,
You can see the example
When i havecolumntype: "numberinput"
and I opend the cell to edit, the number is not the same.
I will have this types of number with 10 decimals to edit.
I cant usecellsformat: "D2"
because i will lost all number and when is executecellvaluechanged
orcellendedit
, the value will have only 2 decimals.
ThanksHello dmesabar,
Please, take a look at this example:
http://jsfiddle.net/ps3e8mfa/
Also, I would like to mention that you could transform the jqxNumberInput to work with decimals.
For this purpose, you could use thedecimalDigits
property.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comHi Hristo,
The problem persist in your example.
If you start to write on cell of quantity, before thejqxinput
was visible, the first number that you write are not put into thejqxinput
. Only will start to write when you type two times the number.
I know that i can use decimals with the propertydecimalDigits
.
If I use for example 2 decimals onjqxinput
, when is executecellvaluechanged
orcellendedit
, independently of if I change or not the original value, the value that will put, only will be with two decimals.
I edited your exemple. On cell of total, if you enter with enter key and finish one more time with enter, you will edit the cell, but really you didn’t edit the number, only you executed to see thejqxinput
Thanks.Hello dmesabar,
To achieve this editing with the first click you need to set the
editmode: "click"
property.
Another, option that I would like to suggest is to implement thehandlekeyboardnavigation
callback.
When is selected cell from this specific column and is used number from the user to typing then you could use thebegincelledit
method.
Also, its the opposite method at the desired moment if you need theendcelledit
method.
I hope this will help.Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comHi Hristo,
You can see the image to reproduce the problem.
On this case, I need press two times the number on keyboard to edit the cell.However, on cell of Unit Price works perfectly because don’t have
createeditor
Thanks.
Hello Singh_kiatec,
Yes, this happens because it does not go in the edit mode.
I mean that editor is not invoked.
Please, take a look at this example:
http://jsfiddle.net/5apc0oqt/1/Best Regards,
Hristo HristovjQWidgets team
https://www.jqwidgets.comHi Hristo,
I think that now works perfectly.
I did two modifications.
OnhandleKeys
function andiniteditor
function, I added the conditionelse
because when you edit the cell and you go to another and press enter key, the value will be the last key or last value of the last cell edited.Thanks.
-
AuthorPosts
You must be logged in to reply to this topic.