开发者

Ext Designer, Combobox, set blank value in the JSON store

开发者 https://www.devze.com 2023-03-18 10:13 出处:网络
i have 开发者_如何学编程a combobox in the designer that loads from a JSON store, i want it to display a blank value in the list along with the data from the JSON store, so the user can go back to null

i have 开发者_如何学编程a combobox in the designer that loads from a JSON store, i want it to display a blank value in the list along with the data from the JSON store, so the user can go back to null after he selects something from the combo.

how will i go about doing this?

thanks.


This solution don't do exactly what you asked, but your JSON can provide no value

{{"display":"", "value":-1},{"display":"first option", "value":1},{"display":"second option", "value":2}}

Then your code should consider value -1 as blank.


Let's say you have a combobox with displayField: desc and selectField: name. Set a JSON record {root: {desc="", selectField=""}}.

0

精彩评论

暂无评论...
验证码 换一张
取 消