jqgrid - edit form field combobox not defaulting to selected row value after first edit
Posted
by
ooo
on Stack Overflow
See other posts from Stack Overflow
or by ooo
Published on 2011-02-13T07:22:23Z
Indexed on
2011/02/13
7:25 UTC
Read the original article
Hit count: 341
i am using jqgrid with asp.net-mvc. I have an edit form (using jqmodal) which works great but for some reason one combobox field doesn't default to the current selected row after the first time i bring up the edit form. the weird thing is that i have many other comboboxes which work fine every time and i don't see any real difference.
here is an example of the field that doesn't work:
{ name: "TechOwner", index: "TechOwner", width: 70, editable: true, edittype: "select", editoptions: { dataUrl: "/Person/GetSelectData" }, editrules: { required: true} },
and here is a field that works fine:
{ name: "FundingType", index: "FundingType", align: "left", width: 25, editable: true, edittype: "select", editoptions: { dataUrl: "/Project/FundingGetSelectData" }, editrules: { required: true} },
the dropdown is getting populated with all options (including the current selected row option) but its just defaulting to the top item) instead of one that matches the current row.
is there anything to look out for here that may cause this behavior?
© Stack Overflow or respective owner