我正在使用Infragistics来显示列表中的数据,该列表包含3列和4-5行(根据添加的数据,最多可以显示'n‘行)。当我将鼠标悬停在该行上2秒钟时,我希望关于该行的其他信息应该显示在类似控件的面板中。如何做到这一点?
如果我这边还需要什么,请让我知道。
发布于 2010-11-22 18:30:24
我已经使用来自控件的MouseEnterElement事件和手动处理额外信息的显示来完成了这类事情。
具体来说,对于我的项目,我引用来自ValueListItem的数据。当该事件被触发时,它将触发该dropdown元素的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 Ifhttps://stackoverflow.com/questions/3879071
复制相似问题