Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Bug in ordering elements of selectbox in filter toolbar
22/05/2013
12:29
Avatar
Johnny
Member
Members
Forum Posts: 4
Member Since:
22/05/2013
sp_UserOfflineSmall Offline

There is a bug in rendering html select in filter toolbar.

When the list of options passed as javascript object like this:

searchoptions: {value: {"":"All", 1: "One", 2: "Two"}}

plugin do not preserve order of elements, due to limitations of javascript itself. This was noticed after last Firefox update (to version 21.0). Before there was undocumented feature in Firefox of preserving keys insertion order while iterating over them.

Workaround for this bug is passing list of options as string value:

searchoptions: {value: ":Al-;1:One;2:Two"}

But this solution isn`t convinient since does not allow to use symbols : and ; in the name of element.

Regards, Ivan.

22/05/2013
13:14
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Thank you for the information.

Sorry there are undocumented delimiter and separator options in serchoptions and editoption.

To avoid this you can by exmple

..., searchoptions: { delimiter:"|", separator"~"...}

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.

22/05/2013
13:33
Avatar
Johnny
Member
Members
Forum Posts: 4
Member Since:
22/05/2013
sp_UserOfflineSmall Offline

Hi, Tony.

Yes, I`ve seen this two parameters in source code, but anyway, this wont cover all possible cases, since I cannot know in advance which characters will be used in name of items which present in filter.

So, our temporary solution is not to use ; and : in names =)

Thanks!

22/05/2013
14:29
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

I'm not sure I can fix this 🙂 and I think it is not a jqGrid bug, but rather a JavaScript behaviour.

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.

22/05/2013
15:12
Avatar
Johnny
Member
Members
Forum Posts: 4
Member Since:
22/05/2013
sp_UserOfflineSmall Offline

Array of Objects can be used instead, actually:

searchoptions: [{id: "",  name: "All"}, {id: "1", "name": "One"}]

Or Array of Arrays like:

searchoptions: [["", "All"], ["1", "One"]]
22/05/2013
18:12
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Thanks. Not bad idea.

I can think about this, but it will requiere more config options which will make the product like "mastodon".

Let me think about.

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.

22/05/2013
18:41
Avatar
Johnny
Member
Members
Forum Posts: 4
Member Since:
22/05/2013
sp_UserOfflineSmall Offline

Thank you for your great job!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
22 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information