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_TopicIcon
Leading zero of text field is dropped in grid
19/05/2009
14:53
Avatar
Jim P
Member
Members
Forum Posts: 102
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

Tony,

This is VERY important for me.

The is colmodel definition of the column.

{name:'waybillnumber',index:'waybillnumber', align:"center",sorttype:"text"},

This is a shipping tracking number and often has a leading zero like this:

099698071193253

The number is correct in the database, but in the grid it show up as:

99698071193253

My grid data type is: datatype: 'json',

Why is this happening?

Thanks,  Jim 

20/05/2009
13:26
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

This really is a problem. I have changed totally this behaviour in 3.5 beta, which will give you the right result. Also try the following

In case of  JSON try to enclose the value in string instead - i.e ... "mynumber" : "099698071193253"

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

20/05/2009
13:35
Avatar
Jim P
Member
Members
Forum Posts: 102
Member Since:
29/01/2009
sp_UserOfflineSmall Offline

Tony,

I've followed the code through.  The json array before being fed to the grid:

<tr><td class="array" onClick="cfdump_toggleRow(this);" style="cursor:hand;" title="click to collapse">11</td>

body: <td> 099698071193253 </td></tr>

Firebug Data Return is: (Data field in question is in bold)

{"ROWS":[["ZT7947",1640872.0,"OFC1234","TACO BELL CORP.  ##OFC1234",
"15\\/05\\/2009 00:00:00","","ATTN
: KATHY WOOD:IRVINE, CA","TACO BELL CORPORATE",sue_somebody@tb.com,
"CATBC",9.9698071193253E13,"FEDERAL EXPRESS"],
["ZT7947A",1640924.0,"OFC1234","TACO BELL CORP.  ##OFC1234","06\\/04\\/2005 00:00:00","","ATTN
: KATHY WOOD:IRVINE, CA","TACO BELL CORPORATE","sue_somebody@tb.com","CATBC",7.06395013304E11,"FEDERAL
 EXPRESS"]],"PAGE":17.0,"TOTAL":17.0,"USERDATA":{"MSG":"Retreived 242 Records.","TYPE":"Success"},"RECORDS"
:242}
It looks like the grid thinks this is a number not a text field.
thanks,  Jim


 

25/05/2009
02:03
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Check the 3.5 beta.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
76 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