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

VividD
  • 10,040
  • 6
  • 59
  • 107
Premanshu
  • 606
  • 2
  • 13
  • 22

1 Answers1

15

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" },  ...
njr101
  • 9,201
  • 7
  • 36
  • 55