What is the best way to clear the clipboard upon hiding a column in a grid? The problem is that when the clipboard is full with all of the column data and then a column gets hidden, and then a user pastes the clipboard, they will see the hidden column data (since it was on the clipboard before they hid the column). So I would like to clear the clipboard each time a column is hidden or revealed. I am trying the following but it isn’t working:
StdGrid.prototype.doOnColumnHiding = function () {
for (var i = 0;i < this.dhxGrid.getColumnsNum();i++) {
if (this.dhxGrid.isColumnHidden(i)) {
this.dhxGrid._srClmn[i] = false;
}
else
this.dhxGrid._srClmn[i] = true;
}
window.clipboardData.setData(“Text”,’’);
this.dhxGrid.gridToClipboard();
}
Grid (2.0+) has inner event - onColumnHidden
mygrid.attachEvent(“onColumnHidden”,function(index,state){
this.toClipBoard("");//clear clipboard
return true;
});