BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
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; } } }
>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]".