disable mouseover row highlight for rows in Grid zk 9.5

asked 2021-04-25 20:49:59 +0800

zkdev4 gravatar image zkdev4

How can I disable mouseover row highlighting for rows in Grid/listbox in zk 9.5

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2021-04-26 14:24:19 +0800

cor3000 gravatar image cor3000
5868 2 7
ZK Team

the hover highlighting is a basic CSS effect, so there's no 'switch' to 'disable'. Instead you can override the CSS.

e.g. globally for all grids:

.z-row:hover>.z-cell {
    background-color: #ffffff;

or per instance by assigning a custom sclass:

<grid sclass="mygrid">...

prefix the style rule with the my .mygrid selector

.mygrid .z-row:hover>.z-row-inner, 
.mygrid .z-row:hover>.z-cell {
    background-color: #ffffff;

Here a runnable example of the per instance case:


link publish delete flag offensive edit


Thanks for the selectors! I've tried it but it produced a secondary side effect : We have labels and textboxes in a grid row and now the label text disappears. Is there any CCS magic to avoid that ? Do we have to write an extra color change selector for the label foreground ?

Thanks again!

zkdev4 ( 2021-04-27 19:55:26 +0800 )edit

I think this doesn't require "magic" just some careful analysis of what's happening and decide what to do next. please update the zkfiddle example (and provide an updated link - I'll increase your karma) to illustrate your case, then I can provide updated styles

cor3000 ( 2021-04-28 11:04:39 +0800 )edit

Sorry for my late reply, I've updated the fiddle with sample code. We are using Atlantic theme and only Sapphire matches our side effects. It is clearly theme based but this is clients requirement so we cannot change it.

zkdev4 ( 2021-05-11 16:55:26 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2021-04-25 20:49:59 +0800

Seen: 10 times

Last updated: Apr 26

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More