Unable to bind the id of the combobox field on grid update

痞子三分冷 提交于 2020-01-07 04:57:09

问题


I'm trying update the grid with the edited values. When I update the bus type and give update, the binded value in the back end is valueFied that's the id, But when I update only time and name the bus type cell renders the displayField which fails the gridupdate at the back end saying Integer value error, since the display field is the string , How would i always render or bind the valuefield to the back end no matter what i update and display always the type name,

here's the fiddle to try.Fiddle

Hoping for a quick response.

Screen Shot of the grid

Thanks much.


回答1:


I Solved this issue by adding below method in the update function.

if(!Ext.isNumber(gridRow.data.typebus))
               {
                   gridRow.data.typebus = gridRow.data.id;                    
               };

hope this helps someone.



来源:https://stackoverflow.com/questions/42511573/unable-to-bind-the-id-of-the-combobox-field-on-grid-update

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