AD
Administrator
Syncfusion Team
December 7, 2004 12:14 PM UTC
Not if you are using a GridDataBoundGrid. If you use a GridControl, then rowstyles are available.
In PrepareViewStyleInfo, try having minimal code that essentially only does minimal lookups and not a whole tour de force of conditional logic.
So, in whatever the trigger mechanisn you are using to decide to color certain rows (or set other properties), you can prepare a ArrayList or Hashtable of objects that hold the state information you need. Then in PrepareViewStyleInfo, you retrieve this state information and use it. You do not have to decide what state information should be used at that point.
This is how you would want to handle any state information that is time consuming to generate. But if it is something like coloring alternating rows, this would probably be simpler just to compute the state on the fly, instead of trying to cache it, and retrieve it.