Why am I not getting any values displayed in my ui-grid dropdown?

时光怂恿深爱的人放手 提交于 2019-12-12 03:47:51

问题


I have this following code for ui-grid column Definition:

{ name: "carrier_influence_group", displayName: "Carrier influence group", enableCellEdit: true, showSortMenu: false,
                editableCellTemplate: 'ui-grid/dropdownEditor', editDropDownOptionsArray: [ { id: 11, value: 'Medium' }, { id: 12, value: 'Large' }],
                    editDropdownIdLabel: 'id',editDropdownValueLabel: 'name'}

I am binding the name of these object to the column.

Every thing is fine normally. The grid as such renders correctly. But when I dbl click to edit this row, the text in this row disappears. A dropdown appears but it has no option to select from. I tried changing my array to:

[ { id: 11, name: 'Medium' }, { id: 12, name: 'Large' }]

What is missing here. I have seen this official code. Seems like all is similar except for a filter. I do not need any such filter. Is it necessary to have one. The official docs do not mention anything about it.

Already referred http://stackoverflow.com/questions/28323540/showing-readable-data-in-ui-grid-with-editable-drop-down-cell


回答1:


First thing to try - it should be editDropdownOptionsArray not editDropDownOptionsArray (note the case).



来源:https://stackoverflow.com/questions/39683921/why-am-i-not-getting-any-values-displayed-in-my-ui-grid-dropdown

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