I have an event for custom hover text on grid rows which gets information from several columns in that row. Is there a way to get additional information from the server using this method? Basically I’d like to include some hover text that uses a database query (data not in the grid) if possible.
dhtmlxgrid is a client-side component and cannot send queries directly to the database.
You may try to include the hover text in a grid’s data as an attribute or a userdata, or create your own custom request to database.
I think I know how the attribute/userdata would work. What is the general idea behind the custom request to the database you mentioned? Is this something done after the grid is loaded and before hover text is triggered, or something that can be done at the mouseover event with an ajax request or similar?
Unfortunately your issue is not clear.
Here is the example of setting the custom tooltip to a cell:
mygrid.attachEvent("onMouseOver", function (id, ind) {
this.cells(id,ind).setAttribute("title",tooltip);
}
return true
});
and example of blocking the default tooltip:
mygrid.attachEvent("onMouseOver", function (id, ind) {
return false;
});