DataGridColumn.OnPastingCellClipboardContent(Object, Object) 方法

定義

引發 PastingCellClipboardContent 事件。

public:
 virtual void OnPastingCellClipboardContent(System::Object ^ item, System::Object ^ cellContent);
public virtual void OnPastingCellClipboardContent (object item, object cellContent);
abstract member OnPastingCellClipboardContent : obj * obj -> unit
override this.OnPastingCellClipboardContent : obj * obj -> unit
Public Overridable Sub OnPastingCellClipboardContent (item As Object, cellContent As Object)

參數

item
Object

所選取項目的資料內容。

cellContent
Object

要貼至儲存格中的內容。

備註

如果您提供 的 DataGrid 自訂貼上實作,這個方法可以當做協助程式使用。 儲存格內容會儲存在 物件中 item

這個方法會 PastingCellClipboardContent 引發 事件。 您可以處理事件,以修改儲存格內容,再貼到儲存格中。 您可以將 設定 cellContentnull 為 以取消貼上動作。

適用於

另請參閱