请教 EasyUi Datagrid 中怎样动态的改变 editor的Type

请问 EasyUi Datagrid 中怎样动态的改变 editor的Type
要求是这样的,我要做一个问卷系统,要根据数据库的值进行当前列eidtor的动态变更,如数据库的值为多选则editor的type为combobox且要为combobox赋值如果是文本且值为字符串类型则type为text如果数字类型则type为numberbox;自己想了好久不知怎么解决,刚接触Easyui不久;各位大神帮忙顶顶呀....

------解决方案--------------------

//定义动态编辑器
if(判断条件){
    var dEditor = {
        type : 'combobox',//根据条件改变
        options : {
            url: ...,
            valueField : 'ID',
            textField : 'Name',
            required : true,
            editable : false        
        }
    };
}
...............
{ field: 'BatchNo', title: '批次号', width: 100, align: 'center', sortable: "true",editor : dEditor}
.................