On Jan 23, 1:37 pm, Jeremy Skinner <
jer...@jeremyskinner.co.uk> wrote:
> Whoops, pressed send too quickly. Here's the full example:
>
> column.For(x => x.Surname).Attributes(x => {
> if(x.Item.Surname == "foo") {
> return new Dictionary<string, object> { { "style", "color:red"} };
> }
> return new Dictionary<string, object>();
>
> });
>
> On 23 January 2011 16:36, Jeremy Skinner <
jer...@jeremyskinner.co.uk> wrote:
>
>
>
> > You can use the Attributes method to do this. There are several overloads
> > for this method, but one takes a lambda expression that can be used to
> > determine which item is being rendered and returns a dictionary of
> > attributes. Here's an example:
>
> > column.For(x => x.Surname).Attributes(x => {
> > if(x.Item.Surname == "foo") {
> > return new Dictionary<string
> > }
> > });
>
> > On 23 January 2011 16:25, Rodrigo Juarez <
consul...@rodrigojuarez.com.ar>wrote:
>
> >> Hi
>
> >> I need to conditional formatting a cell value based on a boolean value
> >> in the model.
> >> I have the column col.For(item => item.Detail); If item.Unfinished I
> >> need to apply some css style
> >> How can I do that?
>
> >> --
> >> Contact Jeffrey Palermo or Eric Hexter with specific questions about the
> >> MvcContrib project. Or go tohttp://