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
Issue in posting dropdown data in form edit on jqGrid
02/04/2014
15:19
Avatar
abhilash.shah
New Member
Members
Forum Posts: 1
Member Since:
15/03/2014
sp_UserOfflineSmall Offline

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

06/04/2014
13:38
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 496

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