Forum


16:41

19/10/2009

Tony,
Any chance of adding a call back on "done" for the columnChooser? It would nice to be able to save the column configuration to the server.
Also, being able to order the columns would be fantastic. Instead of a list of columns you could have 2 lists. The left hand side would contain the hidden columns and the right hand side for the displayed columns. Then add some up/down arrows to the "display" list to re-order the columns (also drag n drop would nice).
Love the tool--Doug
18:06

30/07/2009

dpeterman said:
Any chance of adding a call back on “done” for the columnChooser? It would nice to be able to save the column configuration to the server.
Also, being able to order the columns would be fantastic. Instead of a list of columns you could have 2 lists. The left hand side would contain the hidden columns and the right hand side for the displayed columns. Then add some up/down arrows to the “display” list to re-order the columns (also drag n drop would nice).
There is a "done" callback, but its harder than necessary to intercept (basically, if you intercept it, you're responsible for calling reorderColumns). This should be fixed...
The default callback does this:
You can replace it with one that does that, and then whatever you want.
As for the re-ordering, and two lists - you described /exactly/ how it works today (except that the displayed items are on the left!).
Im guessing you need to include ui.muiltiselect.js (without that you'll just get a standard <select multiple> element)
Mark
This (sending the information back to the server) is very easy to accomplish. There's a function available called "getGridParam" that takes the 'colModel' information from the JS setup (hopefully this makes sense). This returns all of the information about the columns including which are hidden, the order, etc. If you're using PHP you JSON.stringify the data you get back and then send it as an Ajax call to your PHP (or whatever) code. Then you can decide where to keep it, etc. If you need code for this and you're using PHP and MySQL I'd be more than happy to send you what I've done.
To my mind this is the best of both worlds; you get to decide how to store the data but it's easy to retrieve from jqGrid!
Also, to further what markw65 said, the DND option in the hide selection list is already there and works perfectly.
Regards,
PhilM
Most Users Ever Online: 715
Currently Online:
60 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66