如何在我的多列标题上放置颜色样式并居中?

时间:2017-07-06 21:20:01

标签: angularjs kendo-ui

如果你能给我一个例子,我将不胜感激!

enter image description here

提前致谢!

1 个答案:

答案 0 :(得分:0)

您应该使用headerAttributes
示例:

columns:[{
            headerAttributes: {                  
              style: "text-align: center; background-color: red;"
            },
            title: "Header",
            columns: [{
                field: "FirstName",
                title: "First Name",
                width: "120px"
                },{
                field: "LastName",
                title: "Last Name",
                width: "120px"
                },{
                field: "Country",
                width: "120px"
                },{
                field: "City",
                width: "120px"
                },{
                field: "Title"
            }]
          }]