EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: MB34 on April 29, 2015, 03:11:23 PM



Title: [SOLVED] changing display values?
Post by: MB34 on April 29, 2015, 03:11:23 PM
URL: http://www.scic.com/files/website_gatekeeper/

Can't seem to have the Course Type show the same as when the record is in edit mode. I would like to show
OL for val 0
Classroom for val 1
Webinar for val 2



Title: Re: changing display values?
Post by: MB34 on April 29, 2015, 03:20:22 PM
Code:
columns:[[
   ..
  {field:'type',title:'Course Type',
  width:80,align:'right',
  formatter:function(val,row,index){
      return (val==0?"OL":(val==1?"Classroom":"WB"));
  },
  editor:{type:'combobox',
      options:{name:       'type',
                   valueField: 'val',
                   textField:  'txt',
                   data:       [{txt:'OL',val:'0'},{txt:'Classroom',val:'1'},{txt:'WB',val:'2'}]
                   }
              }
           }
]];