private void DataGrid1_ItemCreated(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
  {
   if(e.Item.ItemIndex!=-1)     //鼠标在DataGrid中移动时,选中的那一行显示颜色  
   {  
    e.Item.Attributes.Add("onmouseover","this.setAttribute('BKC',this.style.backgroundColor);this.style.backgroundColor='#99cfff'");  
    e.Item.Attributes.Add("onmouseout","this.style.backgroundColor=this.getAttribute('BKC');");  
   
   }  


  }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2021-06-07
  • 2021-10-31
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-19
  • 2021-08-22
  • 2022-12-23
  • 2022-12-23
  • 2021-06-02
相关资源
相似解决方案