簡體   English   中英

Infragistics.Win.UltraWinGrid.UltraGrid中的DataGridView.HitTestInfo等效?

[英]DataGridView.HitTestInfo equivalent in Infragistics.Win.UltraWinGrid.UltraGrid?

有誰知道Infragistics UltraGrid控件是否提供類似於DataGridView.HitTestInfo的功能?

看看這個

它們不轉換坐標,但它們使用特殊的Infragistics網格事件( MouseEnterElement )來獲取鼠標當前懸停的元素。

也許有幫助。

有一個.MousePosition屬性,返回System.Drawing.Point和“獲取鼠標光標在屏幕坐標中的位置”,但我使用的是舊版本的UltraWinGrid(2003)。

他們有免費的試用版下載 ,所以你可以看看他們是否已將它添加到他們最新和最好的:o)

如果您有UltraGrid的MouseEventHandler,那么您可以執行以下操作:

UltraGrid grid = (UltraGrid)sender;

UIElement element = grid.DisplayLayout.UIElement.ElementFromPoint(new Point(e.X, e.Y));

然后,您可以使用element.GetContext()根據其預期類型強制轉換元素:

 UltraGridCell cell = (UltraGridCell)element.GetContext(typeof(UltraGridCell));

暫無
暫無

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

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