Posted 7 March 2023, 4:47 am EST
Hello Thanh,
I hope this message finds you well. I understand that you are interested in implementing the drag & drop feature with values only. If it’s okay with you, I would like to offer a suggestion that may help you achieve this goal.
To accomplish this, you can bind an event handler to the DragDropBlock event, and in the event args of the handler, change the args.copyOption property to GC.Spread.Sheets.CopyToOptions.value. This will enable you to drag and drop cell ranges with values only.
I kindly ask that you refer to the code snippet and attached sample provided in the documentation for further guidance. If you face any issues, please do not hesitate to let us know, and we’ll be more than happy to assist you.
spread.bind(GC.Spread.Sheets.Events.DragDropBlock, (event, args) => {
args.copyOption = GC.Spread.Sheets.CopyToOptions.value;
});
Documentation references:
DragDropBlock event: https://www.grapecity.com/spreadjs/api/classes/GC.Spread.Sheets.Events#dragdropblock
CopyToOptions enumeration: https://www.grapecity.com/spreadjs/api/enums/GC.Spread.Sheets.CopyToOptions
Sample: https://jscodemine.grapecity.com/share/LPkNRKyra0qPbKKPWkxb9w/?defaultOpen={"OpenedFileName"%3A["%2Findex.html"%2C"%2Fsrc%2Fapp.js"]%2C"ActiveFile"%3A"%2Fsrc%2Fapp.js"}
Regards,
Ankit