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_TopicIcon
How can multiple options be set in ajax json for a select type field?
23/11/2012
19:17
Avatar
alix
Member
Members
Forum Posts: 3
Member Since:
23/11/2012
sp_UserOfflineSmall Offline

How can multiple options be set in ajax json for a select type field?

I'm using jQGrid without any problem I mean even about select edit tags and editing(updating database)

BUT

Now I need multiple=multiple for select options, so I used this

[CODE]
{
    "index":"Module[2]"
    ,"header":"products"
    ,"width":"30px"
    ,"type":"select"
    ,"editoptions":{
        "value":"2:show details;4:add item;8:edit or delete item;32:show list;64:add cat;128:edit or delete cat;16:upload;254:all"
        ,"multiple":"multiple"
        ,"size":8
    }
    ,"name":"Module[2]"
    ,"edittype":"select"
    ,"stype":"select"
    ,"formatter":"select"
}
[/CODE]
Note that the values are in persian language (utf8)

And I've made an interface through php to jQGrid options so some of above options are superfluous.

For json result I tested somthing like this : "32,8" or "8,16,128"

Finally however the multiple select have been made successfully for inline(in-list) edit mode and for edit and add pop up but no option have been selected for json response

also I tested "32;8"

I'm on jqGrid 4.4.0

I couldn't find this subject in documentations

I don't know is there any thing wrong with my col model? or I omitted something?

Should I use formatter and unformat to recreate multiple select options or this ability is in jQGrid native?

Thank you Mr.Tomov

jQGrid is perfect Wink

23/11/2012
19:26
Avatar
alix
Member
Members
Forum Posts: 3
Member Since:
23/11/2012
sp_UserOfflineSmall Offline

I should say if I set single value ("8" or "32") it works and selects the true option

24/11/2012
13:34
Avatar
alix
Member
Members
Forum Posts: 3
Member Since:
23/11/2012
sp_UserOfflineSmall Offline

OK, I could find the fault in my col model
For every other friend who may have this problem
It's so important to set 'multiple'=>true not 'multiple'=>'multiple' unlike to normal html attributes

However the selected values in view mode are appearing as true but

the selected values in edit mode are not selected yet.

I will attempt more. If this work my tasks will be in a shortcut way

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
55 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