The setting of
Hi,
I find you question intresting and inplemented the corresponding solution which you can see live here. In the demo I follow the same way as in the current version of jqGrid and allow deselect the column if one selects it twice. So the behavior is the same like with rows. If you need another behavior you can easy modify my code.
The main parts of the code is following:
var grid = $('#list'), selColumn;
grid.jqGrid({
By the way about the cursor. I have mentioned that in Firefox 4.0 RC there are small problem, that if one click on the column header the caret stay seen. Do you mean the same problem? Either it is a bug in FF or one shoud make small changes in the CSS.
Oleg
P.S. My suggestion I didn't tested in old web browsers and also not tested in case of ts.p.viewsortcols[2] === false.
One should debug the code with the server data. I see small inconsistents in sortname: 'zd.broj_dokumenta' and index: 'broj_dokumenta', twice column 'interni_broj' and name: 'napomena'
Could you post the URL where one could see the problem?
Hello,
the described error there are typically if an error in one from JavaScripts take place. If you would start Developer Tools of IE (press F12 key) and run the scripts under the debugger control (choose “Script” tab and “Start debugging” button) you will see in “Console” tub on the right side the place where the error or exception take place.
Regards
Oleg
You are welcome!
The only problem is to post code in the forum. Currently I have to make replacement of all blanks to and append every line with
to make code looks OK in the forum. I have to do the changes in another text editor and post the code in the HTML view. Probably you know some tricks.
Oleg
No problem Tony!
It is http://www.ok-soft-gmbh.com/jqGrid/LocalFormEditing.htm. It is in the last paragraph of my first post in the tread.
Best regards
Oleg
P.S. I tried meny time to post the whole code also here. It is terrible!
var
I am not sure, Tony what is the best way. Probably you are right, but on the other side if you compare the problem with the same problem of the validation plugin you will see that many people find interesting the question. They also missing the
Tony,
I agree with you that my current suggestion not allows to have two grids in different languages on one page.
Tony,
I agree with you that one can implement all with respect of custom verification rule, but the approach has some disadvantages.
If somebody is new in jqGrid he try to understand and use standard “predefined” features. It is good if he find out that formatter are exist. Then he look through the sandard verification rules and use one from there. Less then 30% of the user will use custom verification rule. So if you think from the point of view of new or not advanced users you will see that predefined regex formatter can has some advantages.
The feature is of course not very important, it is more cosmetical nature and just want to makes some thing to be used easier. I suggested this only after have seen some questions which can be easy solved by the formatter. It seems to me that at least 90% of custom verification rules do just test for regex.
Best regards
Oleg
Tony,
what globalization plugin do is another problem. In my last suggestion with $.jgrid,$.jgrid.regional[] I try to solve problem mostly with pure jqGrid texts from grid.locale-XX.js and not to solve the problem in date and number format for example.
To be able to write international application using jqGrid jqgrid should support including of more then one grid.locale-XX.js files. The choice of the language based on the language of the browser (like in the second example), getting the information from cookie or allowing the user to make a choice is already details. The first problem is to get the possibility to hold more then one language information in the jqgrid. I suggest to use $.jgrid,$.jgrid.regional[] for the porpose to be more close with the names used in the datepicker of jQuery UI (like $.datepicker.regional['fr'] or $.datepicker.regional.fr).
Best ragards
Oleg
Hello Tony,
the usage of randId I like also more, but to be consequent one can also use the same function in grid.base.js, for example here. One can have small compatibility problem if somebody play on the interger sequential id numbers if he don't define any id (or define in the wrong way) in the input data.
One thing I would do: one should verify that the id genrated with respect of Math.random are not yet used. All standard random function are not so random, only random function from the cryptographical modules can produce good rendom numbers. See this answer for example. A simple verification like $(“#”+new_id).length !== 0 will be enough.
I recommed you additionally use Math.floor(Math.random()*idMax+1) instead of Math.floor(Math.random()*idMax) which you currently use. It will no more produce id=0 which can be not the best in different JavaScript compares. The idMax value can be jqGrid parameter initialized to 10000.
What do you think about including supports for local editing in the form editing module? Do you want to implement it youself or I can write an suggestion (till now I didn't find time to do this, but next week I could do this).
Best regards
Oleg
You should verify that you defined sorttype:int or sorttype:float as the property in the corresponding column. Then in case of local sorting the sorting will work like you want.
Best regards
Oleg
Hi Reg,
I suppose that your code generation for jqGrid has a bug where you either use
instead of
or use wrong id in the corresponding jQuery selector, so that use use jQuery(selector).jqGrid with the selector of some other elemets as the
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top