Ver Mensaje Individual
  #7 (permalink)  
Antiguo 10/06/2009, 11:31
Avatar de jlbautista
jlbautista
 
Fecha de Ingreso: enero-2007
Ubicación: Durango, Méx.
Mensajes: 175
Antigüedad: 17 años, 3 meses
Puntos: 1
Respuesta: Como cambio el color de una Fila en un DataGrid en VB .Net

Código:
      void Item_Bound(Object sender, DataGridItemEventArgs e) 
      {
 
         // Use the ItemDataBound event to customize the DataGrid control. 
         // The ItemDataBound event allows you to access the data before 
         // the item is displayed in the control. In this example, the 
         // ItemDataBound event is used to format the items in the 
         // CurrencyColumn in currency format.
         if((e.Item.ItemType == ListItemType.Item) || 
             (e.Item.ItemType == ListItemType.AlternatingItem))
         {
              if(e.Item.Cells[index_de_tu_celda].Text == "A")
                       e.Item.BackColor = System.Drawing.Color.Red;         
          }         
      }