Hi, I can´t manage to change the selected row text color when the cell´s column is configured as Currency.
I´m subscribed to the PrepareViewStyleInfo event and
there I set the BackColor and TextColor properties of e.Style when the cell is in the selected row.
if( ( e.RowIndex > this.grid.Model.Rows.HeaderCount ) &&
( e.ColIndex > this.grid.Model.Cols.HeaderCount ) &&( this.grid.CurrentCell.HasCurrentCellAt( e.RowIndex ) ) )
{
e.Style.BackColor = SystemColors.Hightlight;
e.Style.TextColor = SystemColors.HightlightText;
}
When the column''s Cell Type is Currency, the TextColor is black.
Thx a lot.
AD
Administrator
Syncfusion Team
October 1, 2005 03:07 AM UTC
Here is a little sample showing your PrepareViewStyleInfo code working ok I think.
http://www.syncfusion.com/Support/user/uploads/GDGB_Currency_1d9fd75b.zip
Are you doing something diferent like setting PosiiveColor and NegativeColor on the currency cell?
AD
Administrator
Syncfusion Team
October 3, 2005 08:01 AM UTC
Hi Clay, thx a lot for the reply but unfortunately it''s the same behaviour.
The only other things possibly related I can find have been commented out for no effect :(
I´m using Syncfusion 3.2.1.0 on a Spanish Windows XP system. .NET Framework 1.1
>Here is a little sample showing your PrepareViewStyleInfo code working ok I think.
>
>http://www.syncfusion.com/Support/user/uploads/GDGB_Currency_1d9fd75b.zip
>
>Are you doing something diferent like setting PosiiveColor and NegativeColor on the currency cell?
AD
Administrator
Syncfusion Team
October 3, 2005 08:59 AM UTC
I do not see/recognize the problem behavior. Can you upload a bitmap of the above sample showing the problem you see? Maybe that will allow me to reproduce the problem.
AD
Administrator
Syncfusion Team
October 3, 2005 09:12 AM UTC
I have already mailed it to support@
The currency cell text is shown black while the other columns in the selected row are shown with SystemColors.HighlightText ( White in my case, using the Green Windows XP theme )
>I do not see/recognize the problem behavior. Can you upload a bitmap of the above sample showing the problem you see? Maybe that will allow me to reproduce the problem.
AD
Administrator
Syncfusion Team
October 3, 2005 09:43 AM UTC
Try this. In addition to setting teh TextColor, also set the CUrrencyEdit.PositiveColor.
e.Style.BackColor = SystemColors.Highlight;
e.Style.TextColor = SystemColors.HighlightText;
if(e.Style.CellType == "Currency")
e.Style.CurrencyEdit.PositiveColor = SystemColors.HighlightText;
AD
Administrator
Syncfusion Team
October 3, 2005 09:49 AM UTC
That solved it, thank you, I can see that with currency cells PositiveColor has preference over TextColor... or something ;)
>Try this. In addition to setting teh TextColor, also set the CUrrencyEdit.PositiveColor.
>
>e.Style.BackColor = SystemColors.Highlight;
>e.Style.TextColor = SystemColors.HighlightText;
>if(e.Style.CellType == "Currency")
> e.Style.CurrencyEdit.PositiveColor = SystemColors.HighlightText;
>