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'");
            }

        }
  • 相关阅读:
    websocket1
    webpack 入门三
    weboack 入门二
    webpack 入门一
    输入一个url发生了什么
    http详解
    JavaScript对象详解
    javaScript垃圾回收机制
    js数据类型与隐式类型转换
    iOS证书申请、AppStore上架流程
  • 原文地址:https://www.cnblogs.com/ghx88/p/401171.html
Copyright © 2011-2022 走看看