请高手指教。或者用什么控件。

解决方案 »

  1.   

    只显示前15个字,超出的鼠标移动上去或点击弹出一个DIV显示。
      

  2.   

    只显示前15个字,超出放在ToolTip中!!
      

  3.   

    使用DIV隐藏移动鼠标显示
    或使用textbox等控件
      

  4.   

    rowdatabind事件中加
    if (hylkUrl.Text.Length > 15)
                {
                    hylkUrl.ToolTip = hylkUrl.Text;               
                    hylkUrl.Text = hylkUrl.Text.Substring(0, 15)+"…………";
                    
                }
      

  5.   

    在GridView的RowDataBound事件写如下代码就可以了.    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                string strName = e.Row.Cells[0].Text;//
                if (strName.Length > 12)//判断它的长度,如果大于12就截取字符串
                    e.Row.Cells[0].Text = strName.Substring(0, 12) + "....";
                e.Row.Cells[0].ToolTip = strName;//ToolTip是鼠标指向的效果。
            } 
        }