Extjs在加载存储之前loadRecord之后的组合初始值 [英] Extjs combo initial value after loadRecord before loading store

查看:372
本文介绍了Extjs在加载存储之前loadRecord之后的组合初始值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个与combobox初始值的问题。我使用form.loadRecord()和form.updateRecord()加载表单值,并将它们插入到网格。它工作确定除了组合值。我加载存储combo按需点击时,所以在初始loadRecord()后,我得到一个int值与id。我在网格上有smthid和smthname列。

I have a problem with combobox initial value. I'm using form.loadRecord() and form.updateRecord() to load form values and insert them to grid. It works ok except for the combo values. I load store for combo on demand when it is clicked, so after the initial loadRecord() I get an int value with id. I have both smthid and smthname columns on grid.

我试图更改beforerender的值,但怀疑它被传播到网格。

I tried to change the value beforerender but as suspected it gets propagated to grid. I need to somehow change the initial value of the combo without writing it to the grid when the value is not int.

推荐答案

尝试改变组合的初始值而不写入网格。在组合上使用 setValue() setRawValue()这应该设置显示,但不保存记录,直到 updateRecord()手动。

Try using setValue() or setRawValue() on the Combo. This should set the display, but not save the record until you updateRecord() manually.

这篇关于Extjs在加载存储之前loadRecord之后的组合初始值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆