Forum
13:49
19/09/2013
Hi Tony,
I'm using a unique id made by a custom encoding that means I can have two different records with the same charater but one in lower case and the other lower case.
I saw in the setSelection method that you use $t.rows.namedItem(String(selection)); but this will return the first name that macth with case insensitive.
Why don't use jQuery selector [id=?] or getElementsByName and loop to compare id attribute with the selection variable ?
Could you let me now if you can build a quick fix ?
Thks
14:30
10/08/2009
Hi DigitalForster,
I suppose that you use Internet Explorer. It's remind me about the old answer. I made an official support request to Microsoft and Microsoft confirmed that rows.namedItem works incorrect with the case of ids. In one uses getElementById with id then it works correctly with the case of id in Internet Explorer.
The problem why it's difficult to use getElementById instead of rows.namedItem consist in misunderstanding of uniques of ids (rowids) by many users. Id must be unique over the whole HTML page. The problem is that many developers who uses jqGrid don't understand that. Some developers don't provide any id value at all. jqGrid have $.jgrid.randId() function, but it don't uses it during generating of rowids in case of undefined ids in the input. Instead of that it uses values 1,2,3… to be compatible with old versions of jqGrid. Another possible problem is in usage of more as one grids on the page. Even if the rowids are unique because there come from ids of one database table one can have still conflicts if one would use the same ids for more as one grid on the page. In the case one have to use idPrefix option for at least one grid, but not every edvelopers uses it. So jqGrid have to have code which should work event if rowids are unique inside of one grid only, but could be non-unique on the page. The method rows.namedItem helps here. Only the bug in Internet Explorer makes difficult to use ids which are not unique in case insensitive comparing.
As a workaround I recommend you to use another ids as which you use currently. I understand that it sounds hard, but it's clear that you have not the best choice of id currently. What I mean is just providing case insensitive ids for jqGrid and not changing of your backend. One can imagine many one-to-one conversions of original ids to the values which you can use in jqGrid. For example base64 coversion can be used.
Best regards
Oleg
12:58
Moderators
30/10/2007
Hello,
Instead I will replace the namedItem function. It causes a problems in iOS7 (which i think is a bug in the Safari)
Regards
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.
19:46
04/10/2013
tony said:
Hello,
Instead I will replace the namedItem function. It causes a problems in iOS7 (which i think is a bug in the Safari)
Regards
I had the same problem in IOS 7 with jqGrid. Here is how I solved it. I added this function to the top of jquery.jqGrid.src.js
function CorrectNamedItem(collection, name) { var result = null; $.each(collection, function (index, elem) { if (elem.id === name || elem.name === name) { result = elem; return false; } }); return result; }
Then whenever jqGrid has a call like this:
I changed it into a call like this:
Now IOS 7 jqGrid works fine.
I hope this change can be made into jqGrid permanently, since IOS 7 has poor behavior of the inbuilt function namedItem.
Most Users Ever Online: 715
Currently Online:
33 Guest(s)
Currently Browsing this Page:
1 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