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:
|
1 |
{"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:
|
1 |
{"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.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top