Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Loosing Locale Information in Formatters with inline editing
08/11/2010
14:29
Avatar
chronohh
Member
Members
Forum Posts: 3
Member Since:
26/10/2010
sp_UserOfflineSmall Offline

Hi there

jqGrid 3.8.1 is set up with a column formatted as "currency", loaded with german locale.

Server sends the following data: "3097.23".

jqGrid displays this value as "3.097,23 €". This is right!

But after clicking on the cell for starting inline editing, this cell get transformed back to "3097.23".

Maybe there comes another bug from a previous version alive: http://www.trirand.com/blog/?p.....matter-bug

kind regards

chronohh

09/11/2010
17:29
Avatar
chronohh
Member
Members
Forum Posts: 3
Member Since:
26/10/2010
sp_UserOfflineSmall Offline

I just found the problem by myself:

in file "grid.inlineedit.js" at row number 27 there is the following code:

try {
    tmp =  $.unformat(this,{rowId:rowid, colModel:cm[i]},i);
} catch (_) {
    tmp = $(this).html();
}

Just throwing this stuff away and writing

tmp = $(this).html();

is the solution for us.

Do you see any problems with that?

I suggest, that unformatting the values should happen for sending data to the server, not in display situation.

Kind Regards,

chronohh

09/11/2010
18:03
Avatar
chronohh
Member
Members
Forum Posts: 3
Member Since:
26/10/2010
sp_UserOfflineSmall Offline

Oh, there are side effects with the solution i mentioned  above when you start inline editing but make no changes. When you press escape or leave the cell while clicking on another one, you will receive an "NaN"-Value in the column.

This is because of code in "jquery.fmatter.js", Line 67:

Change

               

nData *= 1;

to

              

return nData;

Regards, chronohh

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
22 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information