DataGridColumn.OnPastingCellClipboardContent(Object, Object) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
引發 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 你可以處理事件,在儲存格被貼上前修改儲存格內容。 你可以設定 cellContent 為 來 null 取消貼上動作。