File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -683,6 +683,11 @@ public ReoGridEditor()
683
683
MessageBox . Show ( this , LangResource . Msg_Range_Intersection_Exception ,
684
684
"ReoGrid Editor" , MessageBoxButtons . OK , MessageBoxIcon . Stop ) ;
685
685
}
686
+ else if ( e . Exception is OperationOnReadonlyCellException )
687
+ {
688
+ MessageBox . Show ( this , LangResource . Msg_Operation_Aborted ,
689
+ "ReoGrid Editor" , MessageBoxButtons . OK , MessageBoxIcon . Stop ) ;
690
+ }
686
691
} ;
687
692
688
693
this . grid . CurrentWorksheetChanged += ( s , e ) =>
Original file line number Diff line number Diff line change @@ -263,7 +263,7 @@ public bool Paste()
263
263
clipboardText = data . GetText ( ) ;
264
264
}
265
265
}
266
-
266
+
267
267
#elif ANDROID
268
268
269
269
#endif // WINFORM || WPF
@@ -306,6 +306,13 @@ public bool Paste()
306
306
return false ;
307
307
}
308
308
309
+ // check whether the range to be pasted contains readonly cell
310
+ if ( this . CheckRangeReadonly ( targetRange ) )
311
+ {
312
+ this . NotifyExceptionHappen ( new OperationOnReadonlyCellException ( "specified range contains readonly cell" ) ) ;
313
+ return false ;
314
+ }
315
+
309
316
// check any intersected merge-range in partial grid
310
317
//
311
318
bool cancelPerformPaste = false ;
You can’t perform that action at this time.
0 commit comments