0
我正在使用Infragistics Ultralistview在列表中显示数据,其中包含3列和4-5行(根据添加的数据可能最多为'n'行)。当我将鼠标悬停在行上2秒钟时,我希望关于该行的其他信息应该显示在控制面板中。怎么做?Infragistics Ultralistview MouseHover检索用户信息
让我知道如果有什么需要从我身边。
我正在使用Infragistics Ultralistview在列表中显示数据,其中包含3列和4-5行(根据添加的数据可能最多为'n'行)。当我将鼠标悬停在行上2秒钟时,我希望关于该行的其他信息应该显示在控制面板中。怎么做?Infragistics Ultralistview MouseHover检索用户信息
让我知道如果有什么需要从我身边。
我已经用Combo使用控件中的MouseEnterElement事件并手动处理额外信息的显示来完成这种事情。
对于我的项目,我特别引用了ValueListItem中的数据。当事件被触发时,它为该下拉元素启动一个UltraWinToolTip。
对于您的项目,您可能希望将额外的数据归入每个UltraListViewItem的Tag属性,并捕获MouseEnterElement。试着这么做(VB):
Dim lst As UltraListView = CType(sender, UltraListView)
If e.Element.GetContext().GetType() Is GetType(UltraListViewItem) Then
'-- Get the item in question
Dim li As UltraListViewItem = CType(e.Element.GetContext(), UltraListViewItem)
'-- Transpose your own data here
Dim dr As DataRow = CType(li.Tag, DataRow)
'-- Use a timer to delay the showing of the tip, or just set the text here
End If
之后,通过使用MouseLeaveElement
,做线沿线的东西清理:
If e.Element.GetContext().GetType() Is GetType(ValueListItem) Then
'-- Get rid of the text
End If
更新:我想在ListView的项目MouseHover事件,而不是ListView控件 – 2010-10-08 07:54:31