日期:2014-05-18  浏览次数:20843 次

在WINFORM中,当鼠标移动到DATAGRID中的某列上,如何让鼠标变成小手形?也就是WEB程序中的超链接样式
如题,谢谢!

------解决方案--------------------
你可以设计DataGrid的光标属性啊

属性:Cursor
------解决方案--------------------
类似这样吧,这是webform的用法
C# code
  
  protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
           e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#F0F0F0';this.style.cursor='hand';");        
        }
    }