﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <description><![CDATA[Comments for Colorizing a TDBGrid]]></description>
    <title><![CDATA[Comments for Colorizing a TDBGrid]]></title>
    <link>http://edn.embarcadero.com/article/20845</link>
    <!-- source: http://edn.embarcadero.com/article/20845/feed-->
    <dc:date>2013-06-20T05:15:23-07:00</dc:date>
    <item>
      <description><![CDATA[Try this to colour an entire row in Delphi 4 rather than using the OnDataDataCell event which is suppose to be obsolete.1. Set the DefaultDrawing property to FALSE2. Create the following OnDrawColumnCell eventIn this example, my list is called MainListprocedure TSwitchPurchases.MainListDrawColumnCell(Sender: TObject;  const Rect: TRect; DataCol: Integer; Column: TColumn;  State: TGridDrawState);begin  if MainTbl.FieldByName('isactive').Asinteger = 0    then MainList.canvas.font.color := clRed;  MainList.DefaultDrawColumnCell(Rect, DataCol, Column, State);  inherited;end;There is a comment in the help about focus rectangles that you may also need to look at.If there is a better way, let me know please.]]></description>
      <title><![CDATA[re: Colorizing a TDBGrid]]></title>
      <managingEditor>
	 (Geoff McCarron-Benson)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=26220</guid>
      <dc:date>2000-08-27T02:35:24-07:00</dc:date>
      <pubDate>2000-08-27T02:35:24-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/20845/feed">Comments for Colorizing a TDBGrid</source>
    </item>
    <item>
      <description><![CDATA[If you want to color the entire row based on the value of one cell, use the syntax FIELD.DATASET.FIELDBYNAME('yourkeyfield').ASdatatype]]></description>
      <title><![CDATA[re: Colorizing a TDBGrid]]></title>
      <managingEditor>
	 (William Grace)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=24695</guid>
      <dc:date>2000-03-27T08:34:52-07:00</dc:date>
      <pubDate>2000-03-27T08:34:52-07:00</pubDate>
      <source url="http://edn.embarcadero.com/article/20845/feed">Comments for Colorizing a TDBGrid</source>
    </item>
    <item>
      <description><![CDATA[This is OK for addressing individual cells, but how do I set whole grid rows to a specific colour (aka MS Money)?.]]></description>
      <title><![CDATA[Colorizing a TDBGrid]]></title>
      <managingEditor>
	 (Richard Lees)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=24346</guid>
      <dc:date>2000-03-01T00:16:32-08:00</dc:date>
      <pubDate>2000-03-01T00:16:32-08:00</pubDate>
      <source url="http://edn.embarcadero.com/article/20845/feed">Comments for Colorizing a TDBGrid</source>
    </item>
    <item>
      <description><![CDATA[AFAIR in Delphi 4 and newer it is recommended to use DefaultDrawColumnCell and OnDrawColumnCell event]]></description>
      <title><![CDATA[Colorizing a TDBGrid]]></title>
      <managingEditor>
	 (Piotr Gawronski)
</managingEditor>
      <guid isPermaLink="true">http://threads.embarcadero.com/threads/threads.exe/view?commentid=24211</guid>
      <dc:date>2000-02-16T01:35:38-08:00</dc:date>
      <pubDate>2000-02-16T01:35:38-08:00</pubDate>
      <source url="http://edn.embarcadero.com/article/20845/feed">Comments for Colorizing a TDBGrid</source>
    </item>
    <generator>Atom 1.0 XSLT Transform v1 (http://atom.geekhood.net)</generator>
  </channel>
</rss>