Enable Row Hover Using Object Notation

Hello,
When enabling row hovering using object notation to initialize a grid, how do you correctly pass in the class name?

The API says the hover option is expecting a {string}. I’ve tried:

var grid = new dhtmlXGridObject({
  hover: "true, hover-class"
});

var grid = new dhtmlXGridObject({
  hover: "true, 'hover-class'"
});

var grid = new dhtmlXGridObject({
  hover: {mode: true, cssClass: "hover-class"}
});

Hello,

Rows hover on mouse over can be specified and enabled for rows in the grid through the following method:

<script>
    grid.enableRowsHover(mode, cssClass);
</script>

The parameters here are:

mode(true|false) - enable|disable rows hover;
cssClass - css class for hovering a row.

docs.dhtmlx.com/doku.php?id=dhtm … erowshover

Thanks,
Victor Johnson

Thank you. So, is object notation not supported if a hover class needs to be specified?

Please see the hover option in the docs below:
docs.dhtmlx.com/doku.php?id=dhtm … tor_object

Yes. Kindly note that for each and every option they specify a method.

In your case
hover - {string} enable/disable hovering
row on mouse over
enableRowsHover

Regards,
Victor Johnson

Thanks. However, notice that the hover option is expecting a {string} value not just a boolean. Is it possible to pass in a formatted string, containing true/false and a class name, instead of using the method? (Please see my first post for examples I’ve tried).

Unfortunately such feature is not supported.

Victor:
Your responses are not clear.

On docs.dhtmlx.com/doku.php?id=dhtm … tor_object
it says one of the properties I can specify is “hover” which takes a string.
The problem is the enableRowsHover() takes two arguments - mode and cssClass.
What do I need to specify in the constructor object to mimic how I use the enableRowsHover() function?
I tried hover:‘mycssclass’ and then hover:{mode:true,cssClass:‘mycssclass’} and they had no effect.

What do I specify if I want to use hover in my constructor?