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
getting value when edittype:"select"
11/05/2009
08:33
Avatar
AKS
Member
Members
Forum Posts: 5
Member Since:
11/05/2009
sp_UserOfflineSmall Offline

hi,

one of my cols in the colModel contains a edittype:"select".

{name:'type',index:'type',width:160,align:"right",sorttype: "select",editable:true,formatter:'select',edittype:"select", editoptions:{value:"1:TypeA;2:TypeB;3:TypeC"}}

To fill the grid im using an array. Everything works fine, when i set the value to "2" "TypeB" is shown.

row example: {idDB:"${time.id}",type:"2")

The user can modify one or more rows and than he can hit my save button. When the hits the butten i want to send the data via DWR to my bean.

var idDB = new Array();
var type = new Array();
var dataIDs = grid.getDataIDs();
for(var i = 0; i < dataIDs.length; i++){
    temp = grid.getRowData(dataIDs[i]);
    idDB[i] = temp.idDB;
    type[i] = temp.type; <--problem only the displayed value
}

ajaxTimeGridSave.saveDataFromGrid(idDB,type);

My problem is now, how can i get the value for the selected type? Because I have to send to my bean when "TypeC" is selected a "3".

Thanks

Arne

13/05/2009
15:24
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

It seems like you use custom editing of the grid data and not the build in form, cell  or inline editing modules (where a key is posted and not the text).

Maybe you should construct your own array from

editoptions:{value:”1:TypeA;2:TypeB;3:TypeC”}

and pass the needed key before posting the data.

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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