Unable to bind the id of the combobox field on gri

2019-09-13 01:16发布

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 grid

Thanks much.

1条回答
2楼-- · 2019-09-13 01:45

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.

查看更多
登录 后发表回答