We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Currency column selected row text color problem with DataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

35463 Sep 30,2005 11:10 AM UTC Oct 3,2005 09:49 AM UTC WinForms 6
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 30, 2005 11:10 AM UTC

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.

Administrator [Syncfusion]
Replied On 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?

Administrator [Syncfusion]
Replied On 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?

Administrator [Syncfusion]
Replied On 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.

Administrator [Syncfusion]
Replied On 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.

Administrator [Syncfusion]
Replied On 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;

Administrator [Syncfusion]
Replied On 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; >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;