[英]DataGridView.HitTestInfo equivalent in Infragistics.Win.UltraWinGrid.UltraGrid?
有誰知道Infragistics UltraGrid控件是否提供類似於DataGridView.HitTestInfo的功能?
有一個.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.