zoukankan      html  css  js  c++  java
  • GridView技巧收集

    1.高亮显示GridView当前行
        protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        
    {
                
    if (e.Row.RowType == DataControlRowType.DataRow)
         
    {
                     e.Row.Attributes.Add(
    "onmouseover""this.style.backgroundColor='yellow',this.style.fontWeight='bold'");
                     e.Row.Attributes.Add(
    "onmouseout""this.style.backgroundColor='white',this.style.fontWeight=''");
                 }
           
    }


        /// <summary>
        
    /// 使GridView实现onMouseOver加亮的方法,需要将方法加在RowDataBound事件中。
        
    /// </summary>
        
    /// <param name="e">GridViewRowEventArgs</param>

        public static void GridViewStyle(GridViewRowEventArgs e) 
        
    {
            
    if (e.Row.RowType == DataControlRowType.DataRow)
            
    {
                e.Row.Attributes.Add(
    "onmouseover""this.className='tdbgmouseover'");
                e.Row.Attributes.Add(
    "onmouseout""this.className='tdbg'");
            }

        }
  • 相关阅读:
    Gson字符串编码,字符串转换成图片保存,二进制转换成图片保存
    时间工具类DateUtil
    RSA 签名、验证、加密、解密帮助类
    富友数据加密解密
    Base64(2)
    MD5(2)
    实体对象操作工具
    HttpClient工具类
    MD5
    身份证算法实现
  • 原文地址:https://www.cnblogs.com/ghx88/p/401171.html
Copyright © 2011-2022 走看看