After rewriting the Search module we have made the hard decision to rewrite the other two modules TreeGrid and SubGrid.
The reason for this lie in the concept of how these modules currently load the data -i.e after inserting every row we bind the appropriate events. This concept is not effective when the data is relative big. In such cases the TreeGrid throw a exception. Now we want to correct this problem binding the events at once.
Again with this we do some structure changes in the code. Lot of not used modules like grid.postdsata.js and grid.columns.js will be not more supported. They will be included into the download and moved to plugin directory. Also we have created another module named grid.addons.js. This module contain methods that will be no more supported. The full list of the methods will be know after a week. We have done some changes in GitHub, so you have a idea what we do.
Another good news is that we have realised (under development) a keyboard navigation in the Grid and Tree Grid. This will make jqGrid one of the best grids.
From today we begin intensive test with jQuery 1.5.1. If you encounter problems with this jQuery release please post it into the form with code example and data. Only these posts will be answered and eventually fixed.
As usual – any questions, comments, anything – is welcome. We are always listening and trying to improve.
It's very good news that jqGrid will have better support of the keyboard navigation!
One more good news is testing of jQuery 1.5.1.
Some rewriting of old code is really needed from time to time. The usage of gridview:true allways also with TreeGrid and SubGrid would be very good in my opinion. I think that the best is to make all binding at the end of jqGrid creating (somewhere before calling of loadComplete). Probably the best place is to make binding and other required operations with DOM after the DOM for the whole jqGrid will be created (or at least the DOM of body: $("<tboby>…</tboby>")), but before it will be placed on the page. It seems to me that one will be have the best performance in the case.
It would be nice if jqGrid Team will try to include QUnit tests and JSLint in the general developing process like jQuery developers made some time ago. It could improve the quality of the code and the stability of jqGrid for changes. Especially after rewriting of large parts of code it would be fine to restart some old standard tests to localize possible compatibility issues.
@pro85 – you can use GitHub. If you do not like this, please post itnto the forum and in the same time send it to me – (the forum formatting is not very good).
@lonelystellar, please look at my original post above:
"From today we begin intensive test with jQuery 1.5.1. If you encounter problems with this jQuery release please post it into the form with code example and data. Only these posts will be answered and eventually fixed."
PS: Also I'd like to mention that pagination values are incorrect since v3.7.2 when datatype:"jsonstring" as you can see in the same provided pastebin (http://www.trirand.com/blog/?p…..tion-v3-8/)
if I click add button on navigation bar at the first time, everything seems normally, the add page pops up, ok, close it. when i click add button again, nothing happens, and i get a javascript error in developer tool. following the error messages:
grid.formedit.js:483 Uncaught TypeError: Cannot read property 'type' of undefined
but when i click the edit button on nav bar there is no problem like i said above.
I suggest to make small changes in the grid.base.js to allow to use data parameter for jqGrid to fill the Tree Grid. The change is very simple. I suggest to replace the line 1400 (return;) to the following
After then one can load the tree in both modes using the data parameter without needs to use additional addJSONData call after the grid or inside of loadComplete. See the demo and compare it with this one. Warning: I don't tested the changes together with local XML (xmlstring) datatypes.
Moreover, please read this my recent suggestion. During writing the answer on the stackoverflow it was clear for me, that one can make only one binding to the "click" event for the whole grid body (see here). Inside the event handle one can examine the clicked object and dispatch the call to the corresponding event handle, for example to the handle used to expand/collapse the tree node or to the handler of the actions formatter. It will work exactly like you dispatch the click to the onCellSelect event handle. The same behavior for the general formatter which need the click handle one can for example use new custom event 'cellClick.jqGrid' one for the whole grid. For example one can bind 'cellClick.jqGrid' event to the grid and call ts.trigger('cellClick', [rowid, iCol]) inside of the main click handle. If you need I can post a code example which will better explain what I mean.
By the way in the case one not only save some resourses need for the onclick event handle for all noded of the corresponding column. One don't need to make any jQuery call with the DOM element of the cell during filling of grid contain or use and "onclick" textes, so the code will stay unobtrusive like the rest of the jqGrid code. One can use gridview:true without any problem (but it is now already so).
Please Tony, think about the way. It seems very interesting for me.
OK Tony, I see that local sorting is not work correctly. The first problem that I ised parent:"" instead of parent:null, but it is not the only problem.
Nevertherless it seems to me that Tree Grid is very close to support pure local data. Even with the restriction to have no local sorting it could be interestung.
To tell the truth I have almost no expirience in Tree Grid, but I am sure, that you can easy find the palaces in the code which made problems and probably also quickly fix the problem. I find the full support of local data would be fery fine feature of the jqGrid.
Is there a working example to get treegrid work with the JSON data? Switching to xml works like a charm. But I cannod switch to XML as my existing data exchange format is JSON.
Oleg's example works but, again it involves adding the JSON data to the grid. Is there a way to make it work with JSON data as a response from a url?
admin said: Another good news is that we have realised (under development) a keyboard navigation in the Grid and Tree Grid. This will make jqGrid one of the best grids.
Do you have any details on the keyboard navigation? And a timeline? (can I test it?)