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. Image for the cookie policy date

Number format . .

Is there a number format the will display the text color in Red if its negative or do i have to do this manually. i am using a grid control in virtual mode. thks ak

3 Replies

AD Administrator Syncfusion Team October 30, 2005 02:47 AM UTC

If you use a CurrencyEdit celltype, you can use style.CurrencyEdit.NegativeColor to set this color. But if you are using other celltypes, then you would have to handle PrepareViewStyleInfo as in this KB to conditionally change e.Style.textColor when e.Style.Cellvalue < 0. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=83


AK Adam K. October 30, 2005 09:23 PM UTC

why would i handle this in prepareviewstyle if i am already listening to QueryCellInfo. Shouldn''t i just handle it there ?? >If you use a CurrencyEdit celltype, you can use style.CurrencyEdit.NegativeColor to set this color. But if you are using other celltypes, then you would have to handle PrepareViewStyleInfo as in this KB to conditionally change e.Style.textColor when e.Style.Cellvalue < 0. > >http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=83


AD Administrator Syncfusion Team October 30, 2005 09:56 PM UTC

QuerycellInfo is fine.

Loader.
Live Chat Icon For mobile
Up arrow icon