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
jqGrid : exporting 'formatted' data
03/10/2014
19:19
Avatar
Rajesh
New Member
Members
Forum Posts: 1
Member Since:
03/10/2014
sp_UserOfflineSmall Offline

Objective: To export data displayed in jqGrid as CSV maintaining existing formatting. Make a generic utility to be used across multiple webpages using jqGrid for exporting data.

Currently I am able to create a csv formatted data from jqgrid and pass it to backend to be saved as .csv file.

Steps Taken:

  • Used

    jqGrid('getGridParam', 'data')

    to get all row data

  • Used

    jqGrid('getGridParam', 'colNames')

    to get colnames

  • Created a tab separated output- No issues.

Problem: Since I used

'data'

, the column values are the raw values and not the formatted values.
For eg, from backend the date comes as a long -

1411674947000

but using custom formatter in jqgrid it displays as

2014-09-25 19:55:47

.

Similarly there are error codes which come as numeric values but formatted to show some text.
The objective is to use the formatted value eg '2014-09-25 19:55:47' in the csv output instead of '1411674947000'.

(I posted the same question in another forum without any success.(http://stackoverflow.com/quest.....atted-data) Sorry for being repetitive.)

21/10/2014
17:58
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

 

The data in grid parameters is source data. The formated data come when a new page is loaded.

Sorry, this is very basic and it is difficult  to make additional function for this purpose.

 

Regards

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: 496

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