Vue开发学习笔记:KendoUIGrid设置列标题样式

使用headerAttributes属性设置列标题样式

data: function () {
    return {
      
      //自定义列集合,页面只显示需要列
      columns: [
        // field:列名,title:列标题,format:数据掩码格式;locked:锁定列(Grid必须有水平滚动条才使用锁定功能)
        {
          field: "selected",
          selectable: true,
          width: 40,
          headerAttributes: {
            style: "text-align: center;",//列标题使用的行内样式
            'class':'GridHeader',//列标题使用的自定义类选择器
          },
        }, //设置选择列
        {
          field: "",
          title: "行号",
          template: "<span class='ROWID'></span>",
          width: 55,
          headerAttributes: {
			style: "text-align: center;",//列标题使用的行内样式
            'class':'GridHeader',//列标题使用的自定义类选择器
          },
        },
        {
          field: "USER_ID",
          title: "用户ID",
          headerAttributes: {
            style: "text-align: center;",//列标题使用的行内样式
            'class':'GridHeader',//列标题使用的自定义类选择器
          },
        },
        {
          field: "USER_CODE",
          title: "用户账号",
          headerAttributes: {
            style: "text-align: center;",//列标题使用的行内样式
            'class':'GridHeader',//列标题使用的自定义类选择器
          },
        },
        {
          field: "USER_PWD",
          title: "用户密码",
          headerAttributes: {
            style: "text-align: center;",//列标题使用的行内样式
            'class':'GridHeader',//列标题使用的自定义类选择器
          },
        },
        {
          field: "USER_NAME",
          title: "用户姓名",
          headerAttributes: {
            style: "text-align: center;",//列标题使用的行内样式
            'class':'GridHeader',//列标题使用的自定义类选择器
          },
        },
        {
          field: "REC_CREATOR",
          title: "记录创建人",
          headerAttributes: {
            style: "text-align: center;",//列标题使用的行内样式
            'class':'GridHeader',//列标题使用的自定义类选择器
          },
        },
        {
          field: "REC_CREATE_TIME",
          title: "记录创建时间",
          format: "{0:yyyy-MM-dd HH:mm:ss}",
          'class':'GridHeader',
          width: 200,
          headerAttributes: {
            style: "text-align: center;",//列标题使用的行内样式
            'class':'GridHeader',//列标题使用的自定义类选择器
          },
        },
        {
          field: "REC_MODIFIER",
          title: "记录修改人",
          headerAttributes: {
            style: "text-align: center;",//列标题使用的行内样式
            'class':'GridHeader',//列标题使用的自定义类选择器
          },
        },
        {
          field: "REC_MODIFY_TIME",
          title: "记录修改时间",
          format: "{0:yyyy-MM-dd HH:mm:ss}",
          width: 200,
          headerAttributes: {
            style: "text-align: center;",//列标题使用的行内样式
            'class':'GridHeader',//列标题使用的自定义类选择器
          },
        },
      ],
      //toolbar:[{template: kendo.template($("#gridBar").html())}]
      
    };
  },

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值