Forum
10:18
Moderators
30/10/2007
Mark,
Here is the example:
http://www.trirand.com/test/jsonmap.html
1. Select row
2. click Get id link ( the value from first column is alerted)
3. reorder columns so that the Inv No is not first.
4. Click next page.
5. Select row and click Get id link - the value of the first column is alerted
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.
10:28
30/07/2009
Edit: I hadnt seen your last post. I do see the problem in your example. I'll keep looking...
Still not seeing it… the rowid is fetched from the row /as returned by the server/, so doesnt (and shouldnt) use orderedCols.
My example is almost identical to yours (language aside!) and Im not having any issues…
Mark
10:34
Moderators
30/10/2007
The important thing is that after reordering you must click to next page using the pager.
Just you can see in Fire bug what are the id after reordering and clicking on next page.
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.
10:42
Moderators
30/10/2007
Mark,
I'm just looking into the code how to fix 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.
23:23
30/07/2009
I've pushed a fix.
I've made a small change to the xml reader behavior - if the id is a number, it uses it as the column index (just like the json reader).
Otherwise, I think the behavior is as before (except that id's are now correct after reordering with repeatitems:false, and a numeric id, or a "key" field).
There are a lot of cases - Im not sure Ive tested them all...
Mark
04:29
Moderators
30/10/2007
Mark,
Sorry that I do not see your last message. With my last post I mean, that I will fix this.
I pushed my solution in the GitHub. I have made allmost all tests, but not the full ones.
Will see and test your solution. We should at end put one.
Sorry again.
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.
09:01
30/07/2009
Hi Tony,
No problem. But I see a couple of issues with your solution:
i) you can no longer change xmlReader.id, jsonReader.id, xmlmap or jsonmap after the grid is created
ii) it doesnt handle the case of ts.p.xmlReader.id is an integer, and repeatitems is true.
iii) there's a bug in the xmlreader: if(f && ts.p.keyIndex[1]) idn = ts.p.keyIndex[1];
That should be if (f.length...) since f is always true. This is in part related to ii), but fixing this doesnt fix ii).
Mark
11:29
Moderators
30/10/2007
Mark,
Thanks for iii) and ii) .
Also you are right, in my solution is not possible to make these dynamic (as before).
My primary goal (as of the whohle grid) was speed, but it seems that in this case we can not implement my fix.
Will test your fix tomorrow and make a merge.
Thanks again.
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.
13:32
30/07/2009
Tony,
Regarding speed - I completely agree, and I think your efforts have certainly paid off; jqGrid is very fast.
But the cost of a lookup in an array of length "n", is completely dwarfed by the cost of fetching a number of lines of length "n" from a remote server, creating table rows from them, and inserting them into the DOM. I think we can afford to do the lookup once per fetch...
Also, for things like this (if performance /was/ an issue), you could cache the last value and then check to see if the cached result is valid - and get the performance but keep things dynamic...
Mark
06:12
Moderators
30/10/2007
Mark,
Looking deeper in your fix I will say, that it is better than my.
I have merged the fix. I do not have do all the tests, but I think during the release we will polish it.
About cache!?! Cache IMHO should be applied with care and I do not want implement it currently in the grid.
I think that all is ok with the fix – suppose that the most grids contain 5-30 columns, this will not impact too much the performance, looping only once per request throght the array.
As your said – the most heavy things are when we do with DOM manipulation.
Next week (if all goes ok) I will do more on the grid as promised. It is pleasure for me to work with you.
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.
11:06
30/07/2009
tony said:
Again me,
This is not correct fix. The correct fix should be in multiselect plugin – i.e when we add a new visible column (whitout reordering) the select list should be updated.
Tony
Tony,
I've just pushed a fix. I've overridden the ui.multiselect's _setSelected method to keep the options array sorted correctly.
Mark
00:52
Moderators
30/10/2007
Mark,
Thanks. Merged.
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.
Most Users Ever Online: 715
Currently Online:
34 Guest(s)
Currently Browsing this Page:
2 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66