Forum
15:19
15/03/2014
Hi all,
I have been trying to seek help and fix the issue with submitting dropdown value in jqGrid on form edit, however no luck yet.
I have JSON which contains BankId. I need to show BankName in jqGrid, and on form edit I need to show this field as drop down with list of bank names. I have modified service to return BankName in addition to BankId. I am showing BankName in grid. In edit mode, I am using dataurl for reading another JSON for BankId and BankName. I am using 'buildSelect' to build the html formatted string for dropdown, with "value" set as BankId and "text" set as BankName.
Issue is when user selects BankName from dropdwon and submits the form, the submitted JSON has BankId value passed in BankName column of JSON.
For instance, a row is initially bind with below data:
{"Id":2,"BankId":2, "BankName":"Bank of America", "EmployeeId":2232,"JoiningDate":"2001-12-23T00:00:00","SalaryAmount":30000.0,"Comments":"test"}
When I change the Bank Name in dropdown and submit the form, the JSON data posted is below:
{"Id":2,"BankId":2, "BankName":"3", "EmployeeId":2232,"JoiningDate":"2001-12-23T00:00:00","SalaryAmount":30000.0,"Comments":"test"}
Issue is - since dropdown option value is set to BankId, BankId is submitted in BankName column.
I can have BankName set as value field, so the text field and value field both have BankName set and on submission on BankName is posted. However I want to submit BankId instead of BankName in JSON posted to server, however BankId has to be passed in BankId field of JSON and not in BankName.
How can I achieve this?
Many thanks,
Abhilash
13:38
Moderators
30/10/2007
Hello,
Issue is – since dropdown option value is set to BankId, BankId is submitted in BankName column.
I can have BankName set as value field, so the text field and value field both have BankName set and on submission on BankName is posted. However I want to submit BankId instead of BankName in JSON posted to server, however BankId has to be passed in BankId field of JSON and not in BankName.
I'm lost with this.
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.
Most Users Ever Online: 715
Currently Online:
26 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