HandsOnTable - Show tooltip for cell -


i want show tooltip cell conditionally e.g. if cell value not valid per rules, show text of rule because of it's invalid.

var hot = new handsontable(document.getelementbyid('example'), {     cells: function(row, col, prop) {         var cellproperties = {};         cellproperties.renderer = 'confirmtradepricerederer';         return cellproperties;     } });  function confirmtradepricerederer(instance, td, row, col, prop, value, cellproperties) {     handsontable.numericcell.renderer.apply(this, arguments);     if (value invalid) {         td.style.color = 'red';         //set tooltip here somehow      } } 

i got working using comments, enter image description here

http://docs.handsontable.com/0.15.0-beta6/demo-comments.html

var hot = new handsontable(document.getelementbyid('example'), {     cells: function(row, col, prop) {         var cellproperties = {};         cellproperties.renderer = 'confirmtradepricerenderer';         return cellproperties;     } });  function confirmtradepricerederer(instance, td, row, col, prop, value, cellproperties) {     handsontable.numericcell.renderer.apply(this, arguments);     if (value invalid) {         td.style.color = 'red';         cellproperties.comment = 'test comment';      } } 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -