Tool tip

In DHTMLX Grid present we are displaying the tool tip as


then we are getting complete cell value as tool tip. But we need to restrict the tool tip length.

It should display only the 300 chars, for this how can we handle it in DHTMLX.

Please help me on this issue.



There are few ways

a) you can use “title” attribute of cell element in XML ( or cell object in case of js api ) to set custom tooltip for the cell.

b) you can redefine default tooltip logic generation, just add next code before grid initialization

var text = (_isIE ? this.cell.innerText : this.cell.textContent);
return text.substr(0,300); //not more than 300 chars

ed - type of column , for which tooltip generation logic will be redefined.