Comments (11)
It's good question, but I can provide examples which shows that it's really common problem in jqGrid. By the way cell editing works not in the same way like inline/form editing.
One more problem exist in case of usage "local"
datatype with data
. If you had for example Boolean true
and false
in the input data and makes local modification of the data you will have "Yes" and "No" strings assigned to the properties.
from jsgrid.
@OlegKi Can you tell us examples "which shows that it's really common problem in jqGrid" ?
I must inform all that date option format "j" for day formatting (in newformat option) is not working anymore with reformat after edit. It's now cutting the first number of the day (like 21 become 1) ...
from jsgrid.
@bouks Can you commit a demo which exhibits the problem?
from jsgrid.
BTW: I like the button logic that you have in the remote demo. I'm thinking if we should add more interactive elements to the demos to showcase API calls as well as config
from jsgrid.
With reformatAfterEdit : false
http://ribouka.com/test-date-reformat-false/
With reformatAfterEdit : true
http://ribouka.com/test-date-reformat-true/
Note the date day is defined on "j" then you can see the second bug in true test. But it is minor bug, since i can change to "d".
You can also see the bug fixed by :
https://github.com/bouks/grid.js/commit/102b9c6f02b48f6d9fd04907c06efdce11e117e2
from jsgrid.
I made a mistake about the "j" option bug, it does not "It's now cutting the first number of the day (like 21 become 1) "
It does : "Set the day to 1"
from jsgrid.
@bouks : Probably you have seen my last post and your question should be interpreted in the context of the changes.
To understand the problems I prepared the demo
http://www.ok-soft-gmbh.com/jqGrid/OK/dateEditing/editingTest.htm
it uses my current version of jqGrid. You can test all three editing mode: form editing, inline editing and form editing. It's important that inline editing and cell editing saves the current row in the internal parameter savedRow
and restore the data on pressing Esc or Clickeing on "Cancel" button (in case of inline editing). The demo uses reformatAfterEdit: true
. I'll remove the option (probably today) and all will work in the same way as in the demo.
The problem with reformatAfterEdit
option is common for jqGrid. It's a property of column of colModel
. So it should have the same effect in all editing modes, but the reality is different.
The demos
http://www.ok-soft-gmbh.com/jqGrid/OK/dateEditing/editingTest47-reformatAfterEdit-true.htm
http://www.ok-soft-gmbh.com/jqGrid/OK/dateEditing/editingTest47-reformatAfterEdit-false.htm
can be used to test the behavior of reformatAfterEdit: true
and reformatAfterEdit: false
in different editing modes.
editingTest47-reformatAfterEdit-true.html:
- You can click on any date and then press Esc to cancel editing. You will see: "NaN-undefined-NaN" instead of the date. If you click on any date, then edit it and press Enter to save you will see the same "NaN-undefined-NaN" results. So one can't edit jqGrid using cell editing in case of having
reformatAfterEdit:true
. - Try to edit the row using inline editing or form editing. You will see that it works correctly. On the other side you can try to use first "+" button (Add by form editing) or the second "+" (Add by inline editing). You will get the same "NaN-undefined-NaN" value by form editing, but Add by inline editing will work.
SoreformatAfterEdit:true
works correctly only in inline editing mode.
Now try
editingTest47-reformatAfterEdit-true.html:
- You will see that cell editing works correctly.
- After inline editing (add new row or edit an existing one) displays wrong data in the grid (in format 2015-01-23), but it one road the grid then one can see that it saves correct data in local
data
. - Editing existing row in form editing displays also wrong data, but saves correct data, but adding new line follows displaying "NaN-undefined-NaN" which stay the same after local reloading. So Add operation of form editing display wrong data and save locally also wrong data.
SoreformatAfterEdit:false
works correctly only in cell editing mode.
In other word one can say that no value of reformatAfterEdit
solves all problems of local data editing. The value should be independent from any editing mode, but reformatAfterEdit:true
works correctly only for inline editing and reformatAfterEdit:true
works correctly only for cell editing. No mode is good for form editing.
It's what I mean when I wrote that editing of date "it's really common problem in jqGrid".
from jsgrid.
If you would try to use formatter: "number"
or formatter: "currency"
together with any editing mode together with German locale for example where ,
(comma) will be used as the decimal separator (decimalSeparator
) you will see that the problem exists not only in case of usage formatter:"date"
. It have sense to edit formatted data in locale format and to save it back in unformatted form. jqGrid currently force everybody to edit 123,35 €
as 123.35
value which is not good.
from jsgrid.
OK what's the status of this issue?
from jsgrid.
Sorry, i'm little busy these times. I think nothing has changed. I'll look at this when i'll come back if no one fix it.
from jsgrid.
reformatAfterEdit with default value false does not make sense in my opinion, should be changed to reformatAfterEdit: true as default
from jsgrid.
Related Issues (20)
- multiselect checkboxes not working properly HOT 1
- clicking form edit submit button does nothing when editurl and url are the same value
- form width in pager edit option not working HOT 14
- Edit option closeAfterEdit not functioning HOT 22
- Builder logs HOT 5
- grid not updating when editing HOT 39
- downloaded files naming in builder HOT 1
- Base in builder HOT 6
- use of grouping and loadonce:true causes subGrids to not work HOT 3
- New less organization HOT 29
- minifying css after (instead of) less HOT 2
- use JSDoc 3 for API documentation? HOT 1
- column alignment off when using group headers HOT 10
- Form Edit repopulate the entire table HOT 2
- What Is The Difference To free-jqgrid HOT 3
- one more jsgrid exist on GitHub HOT 2
- How to submit new row as JSON? HOT 3
- user definable footer summaries via drop down HOT 1
- setting the height property causes the horizontal scroll to unnecessarily appear HOT 3
- Clicking inline editing buttons should not remove selection HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsgrid.