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

Stock price cell

Thread ID:

Created:

Updated:

Platform:

Replies:

13009 Apr 18,2004 03:06 PM Apr 18,2004 05:01 PM Windows Forms 1
loading
Tags: GridControl
Ilya
Asked On April 18, 2004 03:06 PM

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 05:01 PM

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.

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.

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.

;