关于datagrid的选中行变色的?????
function   CheckOnChange(ctrl)    
 {    
       var   trRow   =   ctrl.parentElement.parentElement;         
       if(trRow   !=   null)    
       { 
                   if(ctrl.checked) 
    trRow.setAttribute( "bgcolor ",    "#feeee0 ",   0); 
                   else 
    trRow.setAttribute( "bgcolor ",    "#ffffff ",   0); 
          } 
 } 
 为什么这样子交替项不会变色!!!!!!!!!
------解决方案--------------------你的方法我不确认。也没试过。试试下面的吧。 
 private void DataGrid_1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e) 
 { 
 if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem) 
 { 
 e.Item.Attributes.Add( "onclick ", "this.style.backgroundColor= 'Silver ' ");//这里 
 //e.Item.Attributes.Add( "onmouseout ", "this.style.backgroundColor= 'white ' "); 
 } 
 }