Hello gavphillips!
Only one remark. Be very carfull if you allow user makes multiple add/edit/remove in once. Depend on situation you will have to protocol exactly the order of changes which user do. Moreover if errors like data inconsistence will be produced in user input, if will be very difficult for both server and user to solve the problems.
For example, if you have some unique indexes in the database and user's input try to brake it. In the case server have to produce an error message with enough information for user to modify his input data. If at the end he will have to input all multiple data one more time, the user will not be happy with your problem. An error after the first wrong input can be more user friendly.
If you plan use “multiple add/edit/remove in once” a good client side data validation could be mandotory.
Or another problem. If user delete some data row and add a new one, everything could be correct from the server side. But if you not protocol the changes, you can interpret user input as data modification, which could produce incorrect data changes.
Of cause everything depends from context. A dangerous is also, that if “multiple add/edit/remove in once” in your first model is correct, but during some changes you'll break this. In a komplex model could be very difficult to find such problems.
So my personal recommendation: do all more simple and you will receive the best results. So think twice about whether you really should invest in “multiple add/edit/remove in once”. In the time of quick communication, sending one row to server and back could be the best way.
Regards
Oleg
Hello abkhandelwal!
First of all, if you think that your problem is the problem of jqGrid, so mostly pure javascript problem, you must be able to create a small html/javascript example, where the problem exist. So try to create one html page with a javascript inside, which use jqGrid and do almost the same, which your current project with the error do. Either during this work you find the reason of your problem yourself or you'll create a working example where the problem exist.
If you project works with server, try to fill the same data without comunication with server. To do this, replace “datatype” parameter of jqGrid to “datatype: 'local'” and fill your test data with respect of addRowData function, like this do following code:
jQuery('#list').jqGrid({
Sorry, but nobody can find an error in your code if you don't post the code.
And one more question. Do you use 3.6 or 3.6.4 or the last modification of 3.6.4 from /blog/? It is also importent to write always which version of jQuery and jQQuiery UI you use.
Hallo dorian53!
To make columnChooser working with jQuery UI 1.8 you have to do 2 things:
In initialize options of ui.multiselect you can do ONE from the following
To change destroy function of ui.multiselect or to add options inside of “ui.multiselect” you can use ONE from the following technics:
First technic:
modify ui.multiselect.js by inserting block with options definition (marked bold below):
$.widget(“ui.multiselect”, {
You are right Tony! I didn't read the code carfully enough. Neverthless the problem with jQuery UI 1.8 and Multiselect widget stay. At least in IE the columnChooser don't work at all with jQuery UI 1.8. One sees only an almost empty window. So either ui.multiselect.js or grid.jquery.ui.js should be changed early or later. In my version I changed ui.multiselect.js to be able quickly update jqGrid loaded directly from GitHub, so I almost forget about the problem.
Best regards
Oleg
Hello dorian53!
Bonjour!
You use jqGrid together with jQuery UI 1.8 (RC3), but Multiselect widget (jQuery UI plugin) is not compatible with jQuery UI 1.8 und must be a little modified. One have to modify/overwrite “destroy” function from ui.multiselect.js and set default option of multiselect with a little another way (corresponds to new jQuery UI 1.8 standards). In
/blog/?page_id=393/bugs/small-bug-in-grid-jqueryui-js-and-ui-multiselect-js/ you'll find two ways to do this.
If you at least modify your code from
Hello,
to work with Column Choose you need use MultiSelect plugin (ui.multiselect.css, ui.multiselect.js). Moreover if you use jQuery 1.4.2 and jQuery UI 1.8 you need modify ui.multiselect.js or grid.jqueryui.js a little /blog/?page_id=393/bugs/small-bug-in-grid-jqueryui-js-and-ui-multiselect-js/ or add {“msel_opts”: $.ui.multiselect.defaults} as an option of columnChooser function. You should read documentation /jqgridwiki/doku.php?id=wiki:jquery_ui_methods of Column Chooser function.
I don't recommend you to use jQuery UI 1.7.2 together with jQuery 1.4.2. Either should one use jQuery 1.3.2 with jQuery UI 1.7.2 or jQuery UI 1.8 (in RC3 now) and jQuery 1.4.2. I recommend to use last source of jqGrid from http://github.com/tonytomov/jqGrid if you want to use jQuery UI 1.8.
Best regards
Oleg
Hello Tony,
what I like in jqGrid mostly is that the development politic is user friendly. I mean, that you implement features which be asked. Because of that, it's pleasantly to use jqGrid.
Thanks and best regards
Oleg
I already tested the way with 1px befor I wrote me last post. At least I was enable to drag a column which are 1 pixel wide
, so I hope, that the end user will have no problem too. The real reason of the described problem is the refresh of the column header after the drop, but I am happy also with 1px-solution too.
Best regards
Oleg
Thank you very much, Tony!
It seems to me you have found the correct place of the problem, but the problem is not yet full fixed. To be more exact, the bug in rearder of the last column exist not only for less then 20px like you wrote in the comment on github.com, but also up to 39px:

(see http://www.ok-soft-gmbh.com/Ve…..ixedG1.htm). But after we refresh the picture with respect of Ctrl + '+' or Ctrl + '-' (zoom in/out), everthing will be seen correctly (!!!).
After your last fix (setting “scrollSensitivity”: “1″ option for sortable_opts) the old problem is not fully fixed. If we try to reorder (drag & drop) the last column, which is wide, but not fully seen like this one

it looks like following after reordering:

But after we use scroll bar to move everythig for at least one pixel, we can sees the correct table:

So If you find a way to refresh the table columns after usage of UI sortable widget, one could use large default value of “scrollSensitivity” option. The other solution is to reduce “scrollSensitivity” to 1px (not to 10px like now of the http://github.com/tonytomov/jq…..f2e2889c22) seems also works fine.
Best regards
Oleg
Hello jlb30504!
You didn't write anything about jqModal, jqGrid, jQuery UI and jqQuery version you use. There is some problem if you try to use jQuery 1.4. I posted /blog/?page_id=393/bugs/jqgrid-jquery-1-4/ described the problem and the solution. The problem is that jqModal.js use “$()” instead of “$(document)” which works in jQuery 1.3, but not works in jQuery 1.4, so the code of jqModal.js must be fixed. In the last version of jqGrid the problem is fixed, but the last r14 official version from http://dev.iceburg.net/jquery/jqModal/. So first of all verify that in you version of jqModal.js all “$()” replaced to “$(document)” and if you have nevertheless the problem, describe exactly your environment and post a small code example, which reproduced the problem.
Best regards
Oleg
Hello everybody!
This feature request looks like now more as a discussion. So I say my personal opinion too.
To have the same column header alignments in a jqGrid as for the column seems for me a very good choice. But from the compatibility side I find good if any change from one jqGrid version to a new one don’t change any default behavior. Users find good to see new features in all new version, but not all users find nice to have a new look in a new version. So I would suggest to introduce a new jqGrid parameter with default column alignment (one global parameter for the whole grid) with value like “center”, “left” and “right” and with something like “inherit”, for example, which means, that column alignment should be inherit from the alignment of the corresponding column. One can have an additional parameter in colModel especially for alignment of the column header, which overwrite column header alignment for a column. With this way one receives maximum flexibility, every could implement his favorite alignment of the column headers, but one will don’t change the default behavior of column alignment for existing grids.
Best regards
Oleg
Hello Allen!
It's an interesting question! It seems to me, that currently it is not possible, what you want. The Url parameter (dataUrl) from the editoptions of colModel is static. In some situations jqGrid add some additional parameters depend on context (like Id of row which are editing) to Urls (for example, to editurl), but dataUrl stay currently static. Any event or dataInit function seems be called to late, after elements from element (dropdown) already build. But you could try to modify the (dropdown) inside of dataInit.
The only way I see, which could be probably suitable for your porpose is following. Since version 3.6 of jqGrid there is a function buildSelect, which prepare data for element (dropdown). Inside the function you have not only “data” parameter, which is data returned from the server, but in “this.name” you have the name of column where dropdown are creating. And “this.id” value is constructed in the form id + '_' + name of column. So you could find out the id of the row and the name of the column, which are clicked. If in your case you need, for example, only remove some values from the data returnes from server based on rowId/column, you can solve your problem with respect of buildSelect function. If not, you needs probably modify the code of jqGrid (espetially createEl function near “jQuery.ajax”, line 320 of grid.common.js).
Best regards
Oleg
Hi!
Only small remark. Adding “-o-transform: rotate(-90deg);” to the “rotate” CSS class (see http://www.ok-soft-gmbh.com/Ve…..FixedO.htm) makes example working in the Opera 10.50beta. So the part with “if ($.browser.mozilla)” can be changed to something like
if ($.browser.mozilla || $.browser.opera)
Hello Tony!
Thank you for advice about jQuery UI widget http://code.google.com/p/ist-ui-panel/. It looks like very cool. It pushes me for more investigations.
In http://code.google.com/p/ist-ui-panel/ used SVG in general. For IE one uses also filter technic. But one uses (see http://code.google.com/p/jquer…..;panel.css) flipv() and fliph() together with “position:absolute” and “writing-mode:tb-rl”. Using of “position:absolute” makes calculation on text position more complex. And Microsoft writes in documentation of flipv() and fliph() filters (http://msdn.microsoft.com/en-u…..85%29.aspx and http://msdn.microsoft.com/en-u…..85%29.aspx) following “You can create this effect more efficiently with the BasicImage
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top