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
Preserving Columns or Checking Column Visibility
15/12/2009
23:19
Avatar
Will Smith
Guest
Guests

<!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} p {mso-margin-top-alt:auto; margin-right:0in; mso-margin-bottom-alt:auto; margin-left:0in; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-fareast-font-family:"Times New Roman";} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -->

Hello,

I am trying to figure out a way to preserve a jqgird's column arrangement, on a per user basis.  Is it possible to save the JQ Gird's column arrangement?  Also is it possible to loop through a jq gird's columns to determine which columns a visible and which columns are not?

Thanks in advance.

16/12/2009
17:19
Avatar
SimonL
Member
Members
Forum Posts: 39
Member Since:
23/07/2009
sp_UserOfflineSmall Offline

Hi Tony,

I have an issue that is is related to Will's . I have used the column chooser plugin so the user can choose their column arrangement i.e. which columns are to be visible and in what order. I store the columns the user chose in a cookie and in the order that the user chose in the columnChooser.

When the page is refreshed and the grid is reloaded I hide all columns in the grid, read the cookie and loop through the columns stored in the cookie and make them visible in the grid by calling $(#mygrid).jqGrid("showCol", Cols[i]).

This does indeed make the correct columns visible, but in the order defined in colModel, not in the order the user chose, i.e. the order they were read from the cookie.

Is there a way to make the columns appear in a given order?

Regards,

Simon

18/12/2009
20:16
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

@Wil,l @Simon

You can easy get the current colModel. Nothe that this is the current condition including the width, visibility and etc.

You can

var currcolModel  = $("#migrid").jqGrid('getGridParam','colModel');

So if you save the model in and reload the page and call the grid with the saved model you will have what you want

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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