2011-11-18 51 views

回答

1
column.For(p => p.a).Atributes(p=> 
{ 
    if (p.Item.Status == "Active") 
    { 
     return new Dictionary<string, object>{{ "style", "color:green" }}; 
    } 
    else if (p.Item.Status == "In-active") 
    { 
     return new Dictionary<string, object>{{ "style", "color:red" }}; 
    } 
    return new Dictionary<string, object>(); 
});