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
Getting original row data
25/12/2009
23:15
Avatar
Les
Member
Members
Forum Posts: 44
Member Since:
11/12/2009
sp_UserOfflineSmall Offline

Greetings:

It appears there's no way to get the original row data (element from the response) for any row id.

As an example, the afterInsertRow() method provides 'rowelem' from the response, but currently it's not possible to get 'rowelem' for say the first and the last row inside afterInsertRow().

Would it be possible to add such a function?

26/12/2009
12:00
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

You can use the loadComplete to which we pass the request. If your request is JSON you can get the first and the last original row.

Best 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.

26/12/2009
14:19
Avatar
Les
Member
Members
Forum Posts: 44
Member Since:
11/12/2009
sp_UserOfflineSmall Offline

This solutions is not very efficient because the response needs to be parsed twice.

I was looking for a method to access the already parsed row data.

afterInsertRow() provides row data for the current row, but I need to access any row (not just the current one).

26/12/2009
14:29
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

You can use a datatype as function and here you can do what you want

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.

26/12/2009
14:30
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Sorry, for this - it seems like this is the same as when we use loadComplete.

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.

26/12/2009
14:50
Avatar
Les
Member
Members
Forum Posts: 44
Member Since:
11/12/2009
sp_UserOfflineSmall Offline

Using datatype as function would work for me.  This is a very flexible solution, although more complicated.

Why are you saying this is the same as when we use loadComplete?  I don't follow.  Can you explain?

26/12/2009
15:07
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Now I see what you mean exactley - if I understand rigth. The problem is that in loadComplete you do not have acces to the data, while with custom data type before using addJSONData you have access to all rows before inserted into the grid.

Glad that datatype function helps.

Best 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.

29/01/2010
23:23
Avatar
Les
Member
Members
Forum Posts: 44
Member Since:
11/12/2009
sp_UserOfflineSmall Offline

tony said:

Hello,

Now I see what you mean exactley - if I understand rigth. The problem is that in loadComplete you do not have acces to the data, while with custom data type before using addJSONData you have access to all rows before inserted into the grid.

Glad that datatype function helps.

Best Regards

Tony


Yes, datatype as function works for me, but I don't see the 'Loading..' message.  What can I do to have this message displayed?

Thx,

Les

01/02/2010
10:29
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

in the same function when the request begin do

$("#load_"+gridid).show();

and when end

$("#load_"+gridid).hide();

Where the gridid is the id of the grid

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.

12/02/2010
17:25
Avatar
Les
Member
Members
Forum Posts: 44
Member Since:
11/12/2009
sp_UserOfflineSmall Offline

Tony,

If I use datatype as function and want to sort the grid, can I use sortGrid() or do I have to sort the data myself and then call addJSONData()?

14/02/2010
15:43
Avatar
Les
Member
Members
Forum Posts: 44
Member Since:
11/12/2009
sp_UserOfflineSmall Offline

I found an answer here:

/blog/?page_id=393/bugs/jqgrid-loadonce-problem/&value=loadonce&type=1&include=1&search=3&ret=all

I need to change datatype to 'local'

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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