不知道大家仔细看过stringgride和dbgride的声明了没有,我在delphi的原码grids中看到如下一句话也许对问题会有一些解释:
TStringGrid adds to TDrawGrid the ability to save a string and associated
object (much like TListBox). It also adds to the DefaultDrawing the drawing
of the string associated with the current cell.
可以看出,stringgrid有和每个单元格对应的tstrings,请看grid后面的一个声明:
TStringGridStrings = class(TStrings)而且stringgrid的私有方法getcells也在从对drawgrid的继承时加入(function GetCells(ACol, ARow: Integer): string;)