簡體   English   中英

WPF DataGrid:如何區分對事件處理程序dataGrid_CurrentCellChanged的兩次調用?

[英]WPF DataGrid: How to discriminate between the 2 calls to event handler dataGrid_CurrentCellChanged?

出於某種原因,CurrentCellChanged()事件處理程序被觸發兩次:

(a)用戶單擊單元格時。 我想忽略那個。

(b)用戶編輯單元格內容時。 這是我要抓住的。

如何區分兩個電話?

TIA

您要使用的是CellEditEnding事件。

在此處查看更多信息: http : //msdn.microsoft.com/zh-cn/library/system.windows.controls.datagrid.celleditending(v=vs.110).aspx

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM