Example #1
0
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         /* //高亮显示指定行
          * e.Row.Attributes.Add("onMouseOver", "Color=this.style.backgroundColor;this.style.backgroundColor='#FFF000'");
          * e.Row.Attributes.Add("onMouseOut", "this.style.backgroundColor=Color;");
          * //设置审核状态,并且设置相应的颜色。
          * if (e.Row.Cells[5].Text == "False")
          * {
          *   e.Row.Cells[5].Text = Wq.HighLight("未审核", true);
          * }
          * else
          * {
          *   e.Row.Cells[5].Text = Wq.HighLight("已审核", false);
          * }*/
         //多余字 使用...显示*
         e.Row.Cells[2].Text = Wq.Out(e.Row.Cells[2].Text, 18);
     }
 }
Example #2
0
 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         /*  //高亮显示指定行
          * e.Row.Attributes.Add("onMouseOver", "Color=this.style.backgroundColor;this.style.backgroundColor='#FFF000'");
          * e.Row.Attributes.Add("onMouseOut", "this.style.backgroundColor=Color;");
          * //设置审核状态,并且设置相应的颜色。
          * if (e.Row.Cells[5].Text == "False")
          * {
          *    e.Row.Cells[5].Text = Wq.HighLight("未审核", true);
          * }
          * else
          * {
          *    e.Row.Cells[5].Text = Wq.HighLight("已审核", false);
          * }*/
         //多余字 使用...显示
         e.Row.Cells[2].Text = Wq.Out(e.Row.Cells[2].Text, 18);
         //删除指定行数据时,弹出询问对话框
         ((LinkButton)(e.Row.Cells[7].Controls[0])).Attributes.Add("onclick", "return confirm('是否删除当前行数据!')");
     }
 }