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
how to capture column order
09/08/2010
18:55
Avatar
marc
Member
Members
Forum Posts: 13
Member Since:
07/08/2010
sp_UserOfflineSmall Offline

I am trying to keep track of the column order after reordering the columns but can't find a way to do this. What event is called when columns are reordered? If I can find the event maybe I can add a custom handler to track and save the column order so users can store the column order as a preference.

10/08/2010
10:42
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Look at remapColumns method and array parameter into the docs.

basically you can do

var reorder = jQuery("#mygrid").jqGrid('getGridParam','remapColumns');

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.

10/08/2010
11:35
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hi Mark!

It seems to my Tony misunderstood your question. I hope if you define sortable parameter as an object instead of a boolean you can solve your problem. For example

sortable: {

    options: {

        stop: function(event, ui) {

            var d = $("div.ui-jqgrid-sortable",$(ui.item));

            alert ('Colomn "'+ d.text() + '" was reorded');

        }

   }

}

different options which can be used you can find in the list of options and events on http://jqueryui.com/demos/sortable. The new column order you can get like Tony as described.

Best regards
Oleg 

10/08/2010
19:29
Avatar
marc
Member
Members
Forum Posts: 13
Member Since:
07/08/2010
sp_UserOfflineSmall Offline

Thanks Tony and Oleg for the replies. This is working perfectly!

Marc

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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