I''ve overridden the GridStaticCellModel to produce a image cell that displays the image in the grid and also has a dropdown. I''ve overridden the CanCut, Cut, CanCopy & Copy methods to retrieve the image directly from the cell. This works perfectly.
I''ve also overridden CanPaste & Paste, but they never get called. I step through the code where the grid.Model.CutPaste.Paste() is invoked but the CanPaste & Paste in the renderer never gets called. I''ve overridden the Paste on a different cell type and it works fine. What do I need to do to get these event handlers to be invoked?
ADAdministrator Syncfusion Team June 27, 2004 10:55 AM
The cell renderer Paste/CanPaste events are only raised when the grid has an actively editing CurrentCell.
Since a static cell cannot have an ''active'' cell control, these events are not raised and the grid always handles the paste itself at the grid level since there is no cell control that may need to be populated at this point.
A couple of things you can try. Both involve handling the grid.Model.ClipboardPaste event in one way or the other.
Try handling the event and set e.IgnoreCurrentCell = false. This may allow the renderer events to fire. (It may not depending upon the order that this event is rasied among all its listeners. But is simple to try.
The second option is to handle the event and do the calls to these methods yourself.