简体   繁体   中英

How can i change slickgrid header background color based on a condition?

I am using a angular-slickgrid = 2.30.2,Angular 10, i am using styles.css where i am loading the slickgrid theme through bootstrap.sass file. i have created a shared slickgrid component and using it in parent components wherever required.

  1. i want to change the slick grid header color based on a condition in my parent component. For eg if my variable value is true then show slickgrid header blue else red, how can i do that?
  1. i want to add bottom border for every third row in grid for only one screen/component which is using slick grid, how can I implement that.

i am new to slickgrid, please guide.

Please note that I'm the author of Angular-Slickgrid, there are already plenty of SO questions and answers on how to style SlickGrid, take for example these:

and/or simply use the Column properties cssClass or headerCssClass from the Column interface. I added TypeScript types for everything in latest version which should give you enough indication of what you can try.

Also please remember that Angular-Slickgrid is a wrapper of SlickGrid, searching for SlickGrid will always provide you more result to your question searches

Lastly you're on an older version (2.x) that I no longer support, you should think about migrating eventually to get access to newer features and smaller builds, see Migration Guide 3.x and Migration Guide 4.x

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM