Why can't jQuery jqGrid default my combobox correctly when I have a comma in the select values?

前提是你 提交于 2019-12-11 17:54:26

问题


I am using jqGrid with ASP.NET MVC. I have an edit form which works great, but for some reason I have one combobox field that doesn't default to the current selected row after the first time I bring up the edit form.

I have found the root cause. The values in the dropdown all have commas in them as they are showing name in the format:

[LastName, FirstName]

When I remove the comma from the select values, the problem goes away.

Is there any way to support commas in a select dropdown on a jqGrid edit form?


回答1:


Probably you will find the answer on your question here: you should use object instead of string as the value of the value option for the list of select values.



来源:https://stackoverflow.com/questions/4982992/why-cant-jquery-jqgrid-default-my-combobox-correctly-when-i-have-a-comma-in-the

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!