Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

slick grid column (text-align)

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

like image 215
Premanshu Avatar asked Oct 25 '11 08:10

Premanshu


1 Answers

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" },  ...
like image 166
njr101 Avatar answered Sep 19 '22 18:09

njr101