Description:
I am developing software for an airport company. One of my form contains a Grid with a list of flights. I would like to highlight the flights which are delayed. Not just change the row color, but make it flashing. Does your Grid allow this?
Answer:
Yes, you can implement this functionality using the ExpressQuantumGrid's custom draw abilities - the OnCustomDrawCell or Styles.OnGetContentStyle events. Within the event handler, you should just change the color of the necessary rows as your needs dictate. Additionally, it is necessary to maintain a flag to define the row's flashing state (ON or OFF) and set up a timer to switch this flag.
To force the event handler to be called when the flag is switched, call the Grid's Invalidate method to invalidate its client area (if you are using multiple Views in a single Grid). If you are using a single View only, it is best to invalidate only the area which is occupied by its cells.
The attached sample shows this approach in action.
See also:
How to color a Grid cell at runtime
How to repaint a Grid cell
How to obtain the rectangular area of a particular View cell
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.