Posted 12 March 2018, 11:27 am EST
I have read the documentation and it says pasting is disallowed in readonly columns, however is there a way to prevent pasting in columns without marking them as readonly.
Forums Home / Wijmo / General Discussion
Posted by: meet.shah on 12 March 2018, 11:27 am EST
Posted 12 March 2018, 11:27 am EST
I have read the documentation and it says pasting is disallowed in readonly columns, however is there a way to prevent pasting in columns without marking them as readonly.
Posted 13 March 2018, 1:39 am EST
You can handle the pastingCell event and cancel the event for certain columns to prevent pasting.
grid.pastingCell.addHandler((s,e)=>{
if(e.col==0){
e.cancel=true;
console.log(“pasting cancelled”);
}
});
Here is a working fiddle sample:- http://jsfiddle.net/mjx1by04/