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
select box (dropdown) with multiple=true?
09/10/2008
08:21
Avatar
jonnycattt
Member
Members
Forum Posts: 14
Member Since:
08/10/2008
sp_UserOfflineSmall Offline

All,

  Is there a way to make an edittype of "select" a multiple-select dropdown?

thanks.

marc

09/10/2008
10:53
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

It is a little difficult to do that, but do you have idea how to pass these values to the server? To be a honest I never worked with multi-selects

Regards

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/10/2008
11:48
Avatar
jonnycattt
Member
Members
Forum Posts: 14
Member Since:
08/10/2008
sp_UserOfflineSmall Offline

hey Tony,

  I just monkeyed with grid.formedit.js and added multi-select support. The idea was simply that instead of passing a single ID back to the server, it'd pass multiple IDs, and that's working nicely.  Can I send you the code?  it's in 2 separate chunks in that file. i'd assume you'd modify it to fit your style... i'm no javascript expert, just a server-side dude hacking away.

09/10/2008
11:54
Avatar
jonnycattt
Member
Members
Forum Posts: 14
Member Since:
08/10/2008
sp_UserOfflineSmall Offline

i guess i could say i got it mostly working. the one thing i haven't figured out yet is that the selected options get deselected when submitting the form or when closing the form and then reopening it for editing.

09/10/2008
12:53
Avatar
jonnycattt
Member
Members
Forum Posts: 14
Member Since:
08/10/2008
sp_UserOfflineSmall Offline

ok, so i think i figured that part out, too. I can send you a patch file if you like (created from subversion, comparing my fixes with the latest download).

09/10/2008
13:05
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Any addition is welcome. You can send me this.

Regards

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/10/2008
13:37
Avatar
jonnycattt
Member
Members
Forum Posts: 14
Member Since:
08/10/2008
sp_UserOfflineSmall Offline

cool, i emailed it to you.

One thing I noticed Tony: When I submit the form, the data I just changed reverts back to the original data. If I close the form and re-open it, it's as it should be. Now... the grid itself refreshes, but the editing form seems to revert all fields back to whatever they were when it originally loaded when clicking the row.  (this is form editing, not inline editing).

Is there a parameter or something to get around that?

thanks.

Marc

09/10/2008
13:42
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

I should look into the changes deeper to tell you where is the problem.

By the way which version of jqGrid do you use?

Regards

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/10/2008
13:57
Avatar
jonnycattt
Member
Members
Forum Posts: 14
Member Since:
08/10/2008
sp_UserOfflineSmall Offline

oh man, i'm glad you asked.... i just checked and we have 3.2.4. I'll update that to 3.3 and see if the problem goes away.

09/10/2008
14:18
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

The problem maybe will remain the same. I will instead try to implemt

your work and ajust it to the next upcomming bug fix release this Sunday.

Thank you

Regards

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.

14/06/2010
22:18
Avatar
Scothershman
Michigan
Member
Members
Forum Posts: 7
Member Since:
22/03/2010
sp_UserOfflineSmall Offline

What version was this implemented in. I tried to look thru the docs but cannot find reference to it. I would love to do a multi-select inside a dropdown box.

Thanks!

EDIT: I found the code to implement this. editoptions {multiple:true, size:3...}

23/06/2010
05:22
Avatar
shva
Member
Members
Forum Posts: 6
Member Since:
14/03/2010
sp_UserOfflineSmall Offline

Hai,

anyone want to share the code ? please I need...

Many thanks

Shva

23/06/2010
14:24
Avatar
Scothershman
Michigan
Member
Members
Forum Posts: 7
Member Since:
22/03/2010
sp_UserOfflineSmall Offline

Here is the code snipplet I used to get multiple:

{name:'segmentcode',editable:true, hidden:false, edittype:"select", formatter:'select', editrules:{required:false}, editoptions:{multiple:true, size:7, value:"<cfoutput>#getSegmentCodes#</cfoutput>"}},

The #getSegmentCodes# is a list of items returning from Coldfusion.

This grid is truly an amazing piece of code that has surpassed my expectations. Once again THANK YOU JQGRID!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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