thead 如果数据是1,就为男生

   <table id="dg" title="用户信息"
            toolbar="#toolbar" pagination="true" idField="id"
            rownumbers="true" fitColumns="true" singleSelect="true">
        <thead>
            <tr>
                <th field="uid" width="100">编号</th>
                <th field="uname" width="100" editor="{type:'validatebox',options:{required:true}}">名字</th>
                <th field="ucard" width="100" editor="{type:'validatebox',options:{required:true}}">身份证</th>
                <th field="ugender" width="100" editor="{type:'validatebox',options:{required:true}}",sortable:true,formatter:function(value,row,index){
                        console.log(value);
                        console.log(row.ugende);
                       if(row.ugende==1){
                         return '男';
                       }else if(row.ugende==2){
                        return '女';
                       }}>性别</th>
                <th field="uphone" width="100" editor="{type:'validatebox',options:{required:true}}">电话</th>
                <th field="ucount" width="100" editor="{type:'validatebox',options:{required:true}}">人住人数</th>
            </tr>
        </thead>
    </table>

转换不了

配置都搞错了,列配着用data-options。。建议用js来创建,而不是样式

其他列同样改过来,好好看别人的示例

              <th field="ugender" width="100" data-options="editor="{type:'validatebox',options:{required:true}}",sortable:true,formatter:function(value,row,index){
                        console.log(value);
                        console.log(row.ugende);
                       if(row.ugende==1){
                         return '男';
                       }else if(row.ugende==2){
                        return '女';
                       }}">性别</th>

console.log(row.ugende);
这个的值是什么