标签:
var store = Ext.create("app.store.healthRecordManage.form.familyRelationComboStore");
function rendererData(value, cellmeta, record){
var index = store.find("id",value);
var record = store.getAt(index);
var displayText = "";
if (record == null) {
displayText = value;
}else {
displayText = record.data.value;
}
return displayText;
}
var grid_rowexpander = [
Ext.create(‘Ext.grid.plugin.CellEditing‘,{ clicksToEdit : 1 })
];
var grid_columns = [
{xtype: ‘rownumberer‘},
{header : ‘主键‘,dataIndex : ‘id‘, hidden:true},
{header : ‘与户主关系‘, dataIndex : ‘familyrelation‘,flex:.2, editor :new Ext.form.ComboBox({
store :store,
valueField :"id",
displayField :"value",
forceSelection :true,
typeAhead :true,
triggerAction :‘all‘,
selectOnFocus :true,// 用户不能自己输入,只能选择列表中有的记录
}),renderer:rendererData},
{header : ‘个人档案号‘, dataIndex : ‘archivesnumber‘,flex:.2},
{header : ‘身份证号‘, dataIndex : ‘certificatenumber‘,flex:.15},
{header : ‘姓名‘, dataIndex : ‘name‘,flex:.1},
{header : ‘性别‘, dataIndex : ‘genderValue‘,flex:.1},
{header : ‘性别‘, dataIndex : ‘gender‘,flex:.1,hidden:true},
{header : ‘出生日期‘, dataIndex : ‘birthday‘,flex:.1},
{header : ‘联系电话‘, dataIndex : ‘telephone‘,flex:.15},
{header : ‘地址‘, dataIndex : ‘domicileaddress‘,flex:.3}
];
标签:
原文地址:http://www.cnblogs.com/staryy/p/5390225.html