For i := 0 To N Do For k := 0 To M Do sgProg.Cells[ x,y] := '';
maybe you'll have to try sgProg.Cells[i,k] instead of [x,y] :) I do remember somewhere that was a case like you said and the problem came from the fact that it's better to use the tstrings of the object that is used to store the real information, not the information dislpayed on the grid. --- In [email protected], "Jamie L. Mitchell" <[EMAIL PROTECTED]> wrote: > > This is annoying. Using Delphi 2005 on a Windows XP box. This > anomaly happens with both TSringGrid and TjvStringGrid. > > I go into edit mode > > sgProg.Options := grdOA.Options + [goEditing, goAlwaysShowEditor]; > > and do some editing of the cells. Then, if I want to leave edit mode, > I clean out all of the cells > > For i := 0 To N Do > For k := 0 To M Do > sgProg.Cells[x,y] := ''; > > > and then do the reverse > > sgProg.Options := grdOA.Options - [goEditing, goAlwaysShowEditor]; > > Now here is the problem. After clearing out all of the cells, and > turning off the editor, sometimes cells retain the text they had > before I cleared them out. Physically placing a mouse click in any > cell causes the update to occur, causing all of the cells to go to > NULL. I have tried a variety of fixes, including > > sgProg.Refresh; > sgProg.Repaint; > sgProg.StickADaggerThroughItsHeart(); > etc. > > It just wants to hold onto the text that is no longer in its buffer. > Any suggestions? As I said, the Jedi control has the same behavior. > > Thanks > jamie >

