Hello,
using bcb 2010 / odac 6.90.0.57.
I have a function receiving as parameter a TCRDBGrid, and exporting its content to an excel spreadsheet, works fine.
The cells in the dbgrid have different colors, using the OnDrawColumnCell event.
I would like these colors also to be set in the excel spreadsheet.
I tried setting grid->Col and grid->Row, then using grid->Brush->Color and grid->Canvas->Font->Color to get cell current color, but it doesn't work.
=>Is there a way to know the color of a cell in a T(CR)DBGrid?
Regards.
getting cell color in a TCRDBGrid
not very usable in practise
I have an app with 100's of grids, all inherited from same form, with an onKeyPress allowing an export to excel, but each form has different DrawColumnCell implementation.
My function receives a grid as param, so I should use
grid->InDrawColumnCell(....) for each cell, then read color properties, but I have to be able to give a rect and a state, it seems difficult. Furthermore, the grid is on screen so I would have to prevent the method to be called when displaying the grid.
Does someone have a better method or know another (inherited) component abel to give this information?
Is this information available in the bcb XE version of TDBGrid?
Regards.
My function receives a grid as param, so I should use
grid->InDrawColumnCell(....) for each cell, then read color properties, but I have to be able to give a rect and a state, it seems difficult. Furthermore, the grid is on screen so I would have to prevent the method to be called when displaying the grid.
Does someone have a better method or know another (inherited) component abel to give this information?
Is this information available in the bcb XE version of TDBGrid?
Regards.