ASP.NET 自带的Script 光棒效果 控件字符长短

Page.ClientScript.RegisterStartupScript(this.GetType(), "msg", "alert('未选择任何数据!');", true);

————————————————————————————RowDataBound

光棒

  if (e.Row.RowType == DataControlRowType.DataRow)
        {
            e.Row.Attributes.Add("OnMouseOver", "Color=this.style.backgroundColor;this.style.backgroundColor='lightgrey'");
            e.Row.Attributes.Add("OnMouseOut", "this.style.backgroundColor=Color;");

        }

if (e.Row.RowType == DataControlRowType.DataRow)
        {
            if (e.Row.Cells[6].Text == "处理完毕")
            {
                e.Row.Cells[6].Text = "<font color=blue>处理完毕</font>";
            }
            else
            {
                e.Row.Cells[6].Text = "<font color=red>未处理</font>";
            }
        }

——————————————————————————

 if (e.Row.RowType == DataControlRowType.DataRow)
        {
            if (e.Row.Cells[1].Text.Length > 6)
            {
                e.Row.Cells[1].Text = (e.Row.Cells[1].Text).Substring(0, 6) + "......";
            }
        }

 

 

posted @ 2012-06-21 13:18  ComBat  阅读(193)  评论(0编辑  收藏  举报