Simon,
You don't have to databind in one expression. Just make ItemDataBound event
handler. In the handler check color and set grid cell values in whatever you
wish.
Eliyahu
"SimonH" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi everyone,
>
> If anyone can help me with this I would be really really greatful.
>
> I have a custom object that I can't change. Two of the properties (hair
colour
> and eye colour) are of type Drawing.Color
>
> Unfortunately I cant change the class implementation to make these
properties
> more friendly.
>
> My question is, given that I can't bind a colour to the datagrid (the bind
> process just ignores those two properties) what is the best way to have
something
> sensible displayed?
>
> I don't know whether to use some sort of wrapper or something and I can't
> override the property
>
> Essentially my question boils down to this:
>
> I have to display something sensible corresponding to the color type that
> has been provided.
> I then need to allow the user to change that value and then somehow
convert
> what the user enters back into a Drawing.Color.
>
> I've never come accross someone who's used a Color in this way before.
Should
> he/she not have just used a string or perhaps at least an enummeration.
>
> Thank you all
>
> Simon
>
|