One More Datagrid Problem

Peter Haworth pete at
Thu Dec 23 14:38:38 EST 2010

Ever wished you just hadn't switched on the computer today!

One of my datagrids is displaying data in a way which looks like it's  
trying to display two sets of data on top of each other, kinda hard to  
describe.  Here's a scenario which might explain it better.

I can fix the problem by refreshing the datagrid from its property  
inspector window and all looks fine.  I then do something in my app  
which causes a different set of data with less rows to be displayed in  
the datagrid.  Lets say there were 20 rows in the original data and 10  
in the new data.  Rows 1-10 appear as if the old and new data is  
displayed on top of each other and rows 11-20 are displayed cleanly  
but from the old data.

The data is put into the datagrid by setting its dgText.  If I display  
the dgText in the message box, it looks perfect with only the new data  
showing.  This is only happening in this one datagrid.  I've set  
breakpoints in the code that loads the data and stepped through every  
line but can't see what might be causing this to happen.  The code is  
in a common routine that loads data into any datagrid in my app by  
executing an SQL SELECT then setting the dgText.

Pete Haworth

More information about the Use-livecode mailing list