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
This topic is locked No permission to create posts
sp_Feed Topic RSS sp_TopicIcon
column chooser with multiselect plugin
30/04/2010
14:58
Avatar
Asshiah
Member
Members
Forum Posts: 74
Member Since:
27/04/2010
sp_UserOfflineSmall Offline

Hello,

I am trying to use the column chooser with the multiselect plugin pointed out in the documentation and I seem to have a little bug.

When I click on the button I have added in the navigator to open the column chooser, everything works fine. I can select columns to show/hide and reorder them. When I close the column chooser form, The grid is updated as it should be.

However, until I have reloaded the page or the grid by either refreshing the page or the grid or editing the information it contains, I cannot possibly open the column chooser anymore.

Does anybody know anything about this problem?

30/04/2010
21:26
Avatar
tim
Calgary Alberta Canada
Member
Members
Forum Posts: 61
Member Since:
04/11/2009
sp_UserOfflineSmall Offline

It's a bug.

I am having the same problem. First time I open column chooser it works fine on the second attempt it will not open the dialog.

tim

30/04/2010
22:27
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

I have no such problems. Be sure that you load and use the last version of jqGrid from http://github.com/tonytomov/jq.....ree/master). But if you use the newreset version of grid.jqueryui.js from GitHub, everething will be works. So simply try uncompressedversion from GitHub. I am sure that in a short time a new version of jqGrid will be released. If you do have some problems with the last version of jqGrid, then post an example of you code.

Regadrs
Oleg

02/05/2010
04:24
Avatar
tim
Calgary Alberta Canada
Member
Members
Forum Posts: 61
Member Since:
04/11/2009
sp_UserOfflineSmall Offline

I had already made sure it's not a version issue.

I take the same jquery UI files / theme files  (version 1.3.2 / 1.7.1 or 1.7.3 and the same ui.multiselect.js that always worked for me)

then add the github changes and the bug occurs.

I even tried upgrading to your new multiselect file + jquery1.4.2 + UI 1.8 and it still occurs.

tim

03/05/2010
04:46
Avatar
ddotsenko
Member
Members
Forum Posts: 15
Member Since:
08/03/2010
sp_UserOfflineSmall Offline

Confirming the bug.

Line 38 ( this.container.remove(); ) of grid.jqueryui.js (Per latest in git) emits an unhandled exception and stops the clean up code from finishing. This blocks the column chooser not to appear again.

However the problem is not CAUSED by the code in the line. It's just a symptom. The real problem is that the selector dialog is never turned into "Multiselect" in the first place. The selector that shows up is not Multiselect. It's the default jQueryUI one.

These are the pieces I tried:

- jQuery 1.3.2, jQuery UI 1.7.3

- "Master" branch of Michael's MutipleSelect ("Next" branch needs some extra plug ins and I did not try that)

- jqGrid from git, master.

My setup is exactly like this one (just served locally) : http://www.accentsolution.com/.....store.html

If I load "Multiselect" = bug. (Default jQueryUI selector shows up. "OK" button closes it, but emits an exception at the end)

If I do NOT load "Multiselect" no issues. 

Immediate solution:

Don't use "Multiselect" Don't load it at all.

Proper solution:

The handling of vanila vs multiselect selectors in grid.jqueryui.js is a bit retarded. I would almost say, clean out all "MultiSelect" code out and reapply it again in a careful way. 

Example:

These lines in grid.jqueryui.js is copy'n'paste from 'destroy' method in MultiSelect:

  this.container.remove();

  this.element.show();

It'd make more sense to (a) check if method is there and (b) call it.

I, personally, would rather stay with generic selector from jQueryUI until Michael merges the "Next" into "Master" and makes it stable.

03/05/2010
10:06
Avatar
Asshiah
Member
Members
Forum Posts: 74
Member Since:
27/04/2010
sp_UserOfflineSmall Offline

So in clear, what can I do in order to use the multiselect plugin with the column chooser?

Is it possible to rectify something in the code by myself in order to make it work?

Or must I downgrade the version of the code I am using?

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

Hello ddotsenko!

In the example on the http://www.accentsolution.com/.....store.html I could not find any loading of ui.multiselect.css and ui.multiselect.js. They must be explicit loaded before loading jqGrid (at least before grid.jqueryui.js) in your case before "/static/jquery.jqGrid_remote.js".

03/05/2010
14:15
Avatar
Asshiah
Member
Members
Forum Posts: 74
Member Since:
27/04/2010
sp_UserOfflineSmall Offline

I can't seem to get it working.

I really don't know what to do.

Does anybody have an idea?

03/05/2010
14:42
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Send a link to the problem in order to see what is wrong here, otherwiese I can not help.

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.

03/05/2010
15:28
Avatar
Asshiah
Member
Members
Forum Posts: 74
Member Since:
27/04/2010
sp_UserOfflineSmall Offline

Ok so here are some more details.

I am using:

  • jquery in version 1.4.2
  • jquery-ui in version 1.8.1
  • the standard jqGrid plugin in version 3.6.4
  • ui-multiselect plugin in version 0.3 (0.51-y doesn't seem to work at all)

I am working with an asp.net webforms application.

Everything works just fine (the data loading from a database, the editing, etc.)

The only thing that does not seem to work is that when I use the columnchooser with the multiselect plugin, I can't use it twice in a row. I can use it once and everithing will work, but when I close the columnchooser, I can't open it anymore until I reload the page.

I use this JS code to create the jqgrid:

jQuery("#grid_users").jqGrid({
        datatype: 'json',
        mtype: 'POST',
        url: "/handlers/UsersJqGridLoad.ashx",
        colNames:['Name', 'Firstname', 'Login', 'Password'],
        colModel :[
            {name:'name',
             index:'name',
             editable:true
            },
            {name:'firstname',
             index:'firstname',
             editable:true
            },
            {name:'login',
             index:'login',
             editable:true
            },
            {name:'pwd',
             index:'pwd',
             editable:true
            },
        ],
        autowidth: true,
        height: "auto",
        gridview: true,
        scroll: 1,
        sortable: false,
        sortname: 'name',
        sortorder: 'desc',
        hidegrid: false,
        caption: "Users information",
        editurl: "/handlers/UsersJqGridEdit.ashx",
        pager: "#pager_users"
   });
   jQuery("#grid_users").jqGrid('navGrid','#pager_users',{edit:true,add:true,del:true,search:false,refresh:false},{closeAfterEdit: true},{closeAfterAdd: true},{closeAfterDel: true});

Let me know if you need anything else to help you find out the problem Tony.

Thank you a lot.

03/05/2010
15:54
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

I recommend you to use the multiselect plugin which is bounded with jqGrid download.

Also I recommend you to use the latest code from GitHub.

Please let me known if this solves the problem

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.

03/05/2010
16:20
Avatar
Asshiah
Member
Members
Forum Posts: 74
Member Since:
27/04/2010
sp_UserOfflineSmall Offline

I have tried using the multiselect plugin provided with the download of jqgrid 3.6.4.

I doesn't solve the problem.

In fact, it is even worse. I still can't use the column chooser two times in a row without reloading the page.

And this time, when I try to remove some columns, it appears as if nothing happens in the column chooser window.

But if I click on the Submit button, the modifications are still taken into account.

It is strange.

I have also tried the version 0.3 of the multiselect plugin provided here:

http://github.com/michael/multiselect/

And it is even worse than the version provided with the jqgrid download as nothing shows up in the column chooser window.

Do you think I should use the uncompressed version of the jqgrid from giHub instead of the compressed version provided with the download?

03/05/2010
16:27
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Try the last version of jqGrid from GitHub, not multiselect.

Sorry, but I can not help anymore if there is no link to the problem.

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.

03/05/2010
17:29
Avatar
Asshiah
Member
Members
Forum Posts: 74
Member Since:
27/04/2010
sp_UserOfflineSmall Offline

Okay, I have tried every combinaison of the different version (current official release and GitHub last version in development) of the jqgrid and the multiselect plugin.

And I still get this problem. i can't use the column chooser twice in a row without reloading the page.

By a link you mean a link to a page where you can see the problem in action?

For that I must found a place to upload an example

Isn't it possible to just post the complete code for an example?

03/05/2010
18:08
Avatar
Asshiah
Member
Members
Forum Posts: 74
Member Since:
27/04/2010
sp_UserOfflineSmall Offline

Okay so I have implemented a very simple example using a single php page in wich I use a jqgrid.

I use local data and I have disabled editing.

This grid's only purpose is to demonstrate the column chooser multiselect plugin combination.

It uses:

  • jquery 1.4.2
  • jquery-ui 1.8.1
  • jqgrid 3.6.4
  • ui-multiselect plugin 0.3

Here is the link to the whole source folder:

http://www.2shared.com/file/iw.....G/BUG.html

In this example, you can see that it is impossible to use the column chooser twice in a row without refreshing the page.

03/05/2010
18:35
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks.

The most common error here. You load a multiselect plugin after jqGrid and not before.

I added a important note into the documentation.

So your order of loading should be this:

    <script type="text/javascript" src="./js/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="./js/jquery-ui-1.8.1.custom.min.js"></script>
    <script type="text/javascript" src="./js/ui.multiselect.js"></script>
    <script type="text/javascript" src="./js/grid.locale-en.js"></script>
    <script type="text/javascript" src="./js/jquery.jqGrid.min.js"></script>
.....

Best Regards

Tony

P.S. Oleg - you are right - we should detect this

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.

03/05/2010
19:17
Avatar
ddotsenko
Member
Members
Forum Posts: 15
Member Since:
08/03/2010
sp_UserOfflineSmall Offline

OlegK said:

Hello ddotsenko!

In the example on the http://www.accentsolution.com/.....store.html I could not find any loading of ui.multiselect.css and ui.multiselect.js. They must be explicit loaded before loading jqGrid (at least before grid.jqueryui.js) in your case before "/static/jquery.jqGrid_remote.js".


Here is the example of that loads the multiselect JavaScript. In this case, the selector, as you can see, does not become "MultiSelect" It just stays as regular jQuery UI Dialog + selects inside.

http://www.accentsolution.com/.....elect.html

In my case, the style of multiselect is never applied to the selector. I traced the issue in file grid.jqueryui.js to line 260, which takes us to line 250, after which it enters spagetti code which i don't (have little patience to) understand. 

I do appear to be loading multiselect before jqGrid and after jQuery UI.

The parts are the same:

- jQuery 1.3.2, jQuery UI 1.7.3

- "Master" branch of Michael's MutipleSelect ("Next" branch needs some extra plug ins and I did not try that)

- jqGrid from git, master.

03/05/2010
21:25
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Does this work with the same settings with jQuery 1.8.x?

Also try to add DOCTYPE in your document.

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.

04/05/2010
10:03
Avatar
Asshiah
Member
Members
Forum Posts: 74
Member Since:
27/04/2010
sp_UserOfflineSmall Offline

Hello Tony,

Thanks for this information about the loading order.

However; it doesn't solve the problem. I still can't use the column chooser twice in a row...

04/05/2010
10:53
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Dear Asshiah,

If you have read this therad carfully from the beggining to the end you will notice following 2 importanta things (see Oleg posts)

1. The multiselect should be loaded before jqGrid.

2. the columnChooser method of the current official version of jqGrid 3.6.4 is not compatible with jQuery 1.4 and jQuery UI 1.8.

In order to use it in this enviroment you should get the version from GitHub.

In order to demonstarte you that everthing work, you can download your examples from here.

The one is bounded with jQuery 1.3.2 and jQuery UI 1.7 the other is with jQuery 1.4 and jQuery 1.8.

Both works well in my demo.

And again you have the wrong version for the multiselect plugin. I the zips I have put those provided with jqGrid.

http://www.trirand.com/tests/c.....ser1.7.zip

http://www.trirand.com/tests/c.....ser1.8.zip

Enjoy

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.

This topic is locked No permission to create posts
Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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