Home >Web Front-end >JS Tutorial >Problem using Combobox to select value in ExtJS PropertyGrid_extjs
Problem description:
When using Combobox to select a value in the PropertyGrid, the value of the displayField should be obtained, but when confirming the selection, the value of the valueField is displayed. For example, when selecting gender in the drop-down menu, the displayField is 'Male'. 'Female', the corresponding valueFields are '0' and '1' respectively. The original selection should display Chinese description, but instead it displays identification data such as 0 or 1, which should not be acceptable to users.
Solution:
Intercept the Grid's beforepropertychange event, set the displayed value, and then return false to prevent the validation reset in the modification event.
For example: