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

        }
  • 相关阅读:
    v-model
    CSS background 属性
    渐变背景
    mint ui的field用法和修改样式的方法
    js 数组包含
    password 密码查询
    web 单一平台登录逻辑
    内存共享锁业务逻辑(原创)
    无限分类树操作
    根据日期获取,x岁x月x天
  • 原文地址:https://www.cnblogs.com/ghx88/p/401171.html
Copyright © 2011-2022 走看看