OlegKi / jqGrid-plugins

some plugins or extensions to jqGrid
36 stars 15 forks source link

win multi select doesn't work out of the box #6

Closed catbadger closed 6 years ago

catbadger commented 6 years ago

An example of the win multi select plugin would be super great. :)

catbadger commented 6 years ago

wow derp.

$('blah').jqgrid(...).winMultiSelect();
OlegKi commented 6 years ago

Yes. It's really simple. One should only use jqGrid instead of jqgrid and the usage of .jqGrid("winMultiSelect"); is more safe and it's required if you use $.jgrid.no_legacy_api = true; before jquery.jqgrid.min.js

catbadger commented 6 years ago

Thanks for the quick response even though I answered my own today! Why did you choose to make these jquery plugins and not jqgrid plugins?

OlegKi commented 6 years ago

Sorry, but it seems there is a misunderstanding in the terminology. jqGrid plugins is addOn to jqGrid and jQuery plugins is plugin to jQuery. I use $.jgrid.extend method of jqGrid to define new jqGrid method. In other words winMultiSelect is new jqGrid method and jQuery.jqGrid.winMultiSelect.js is jqGrid plugin and not a jQuery plugin.

catbadger commented 6 years ago

To clarify: I meant that you're not using the built-in plugin system of jqgrid, you're extending the object via the jquery way.

OlegKi commented 6 years ago

$.jgrid.extend is the only built-in plugin system of jqGrid. If you look at any module of jqGrid (like the lines for example) then you will see that jqGrid internally uses $.jgrid.extend to define new methods.

catbadger commented 6 years ago

Thanks for the clarification Oleg! :)