读书人

xtragrid 怎么判断 鼠标 悬浮 到某列

发布时间: 2012-03-27 13:44:24 作者: rapoo

xtragrid 如何判断 鼠标 悬浮 到某列?
使用xtragird中的一列显示图片,现在想实现当鼠标悬浮到该列时显示大图片。
但是不知道该怎么判断当前鼠标已经悬浮到该列上了?
请指教!

[解决办法]

VB.NET code
Dim sValue_Old As String = ""Private Sub GridControl1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles GridControl1.MouseMove        Dim hi = GridView1.CalcHitInfo(e.Location)        If hi.InRowCell Then            If hi.Column Is 目标列 Then 'GridColumn1                Dim sValue As String = GridView1.GetRowCellValue(hi.RowHandle, 目标列).ToString                If sValue <> sValue_Old Then                    sValue_Old = sValue                    Console.WriteLine(sValue)                End If            Else                sValue_Old = ""            End If        End IfEnd Sub 

读书人网 >C#

热点推荐