I am loading data from a database, and in some cases, the data I load into a HOT will NOT be in the list for a dropdown cell. In this case, I want HOT to automatically highlight it in red as invalid once I set the data, so the user knows to go to the cell and fix it. How can I do this?
At the moment, the data displays as ‘valid’; if i then go to the cell, and hit the enter key (i.e. don’t change the data), it turns red, as expected. I’d like it to turn red automatically when I set the data model value.
I tried validateCells() followed by a render() but that didn’t work. Any ideas?
Sorry, took me a bit to get back to this problem. I tried your suggestion:
hot.validateCells(function() {
hot.render();
});
But, when I do this (which is immediately after a loadData() command that adds a column, the column (about 100 rows worth) goes from being added instantly to taking about 15-20 seconds to render. During that time Chrome is using about 20% CPU. When I put a console log in there, I can see the callback is being called 444 times. Why would this cause that problem? How do I validate the loaded cells properly?