2012-10-12 31 views

回答

0

請嘗試使用下面的代碼片段。

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
{ 
    if (e.Item is GridDataItem) 
    { 
     GridDataItem item = e.Item as GridDataItem; 
     if (item.ItemIndex % 2 == 0) 
     { 
      item.BackColor = System.Drawing.Color.Red; 
     } 
    } 
}