【发布时间】:2013-06-08 06:40:37
【问题描述】:
在这里,我在网格中有一些列,我想在“receivedquantity”字段中提供默认值,默认情况下,收到的数量字段将等于“Quantity”字段。如果用户编辑该字段,则数据将出现来自数据库。我在这里使用 mvc 模式...
this.columns=
[
{
header:'name',
dataIndex:'name'},
{
header:'Quantity',
dataIndex:'quantity',
},
{
header:'Received Quantity',
dataIndex:'receivedquantity',
selectOnFocus: true,
filterable:true,
renderer:function(val, meta, record){
var receivedquantity = record.data.receivedquantity;
var quantity=record.data.quantity;
if(receivedquantity==0)//by default receivedquantity=0
{
//set (receivequantity=quantity) in the grid's received quantity cell
}},
editor: {allowBlank:false
}
}
];
【问题讨论】:
-
您希望默认值仅显示在网格中,还是在商店中表示?
-
从你的编辑我猜你只是想渲染它..
-
暂时只需要显示