slick grid column (text-align)
Asked Answered
B

1

9

Is there any way to align the header in a slick grid to center and the text in the columns to left? any css files need modification or something else?

Please guide.

var columns = [ 
  { id: "colEmpId", name: 'Number', field: "EmpId", "unselectable": false }, 
  { id: "colLastName", name: 'Last Name', field: "LastName", "unselectable": false }, 
  { id: "colFirstName", name: 'First Name', field: "FirstName", "unselectable": false } 
]; 

This is column definition

Boisleduc answered 25/10, 2011 at 8:53 Comment(0)
T
16

You can style the headings using the built-in classes in the css sheet.: .slick-header .slick-header-column .slick-header-columns .slick-headerrow-column .slick-headerrow-columns

For text in the columns you can assign a custom css class in the column definition and add this to your style sheet.

e.g.

var columns = [ { id: "colEmpId", name: 'Number', cssClass: "column-empid" },  ...
Trujillo answered 25/10, 2011 at 9:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.