>The CurrencyEdit control from our tools (which the grid''s cell control is based on) does have a Zero color property, but this was not exposed in the grid version. We will have to change that.
>
>As far as a work around until there is a release that handles this, maybe you can do what you want with PrepareViewStyleInfo.
>
>private void gridControl1_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e)
>{
> if(e.ColIndex > 0 && e.RowIndex > 0 && e.Style.CellType == "Currency")
> {
> double d = 0;
> try
> {
> d = double.Parse(e.Style.Text, e.Style.CurrencyEdit.NumberFormatInfoObject);
> }
> catch{}
> if( d == 0)
> {
> e.Style.CurrencyEdit.PositiveColor = Color.Purple;
> }
> }
>}
>
It did not work like you suggested.
Everytime you set a Color either Positive, Negative or ForeColor there is a call to a SetControlColor() method in Tools.NumberTextBoxBase
resetting the ZeroColor propety always to "Color [ControlText]".