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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Stock price cell

Thread ID:





13009 Apr 18,2004 07:06 PM UTC Apr 18,2004 09:01 PM UTC WinForms 1
Tags: GridControl
Asked On April 18, 2004 07:06 PM UTC

I''m looking for a way to implement a cell which would turn red if the value (float) is decreased or green if increased and after some time gradually start to fade out to the original color. So far I figured I have to derive my own cell model/renderer, however I have no clue what to do next. Any help will be much appreciated.

Administrator [Syncfusion]
Replied On April 18, 2004 09:01 PM UTC

Here is one idea that does not require a derived cell. 1) Create a class that holds row, col and fadestate information. fadestate might be a integer from 100 to 0. Think of this as a Fade object. 2) Create an arraylist to hold Fade objects. 3) When a cell needs to fade, create a fade object for this cell and set its fade state to max. 4) As long as the arraylist has objects in it, have a timer firing at some rate. In the tick handler, refresh each cell in the arraylist, and modify its fadestate. When the fadestate is zero, remove teh obect from the array. 5) Then in PrepareViewStyleInfo, check the cell to see if it is in the arraylist, and if so, use the fadestate value to specify the color.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon