Major Datagrid Issues

Peter Haworth pete at lcsql.com
Fri Apr 13 21:57:53 EDT 2012


I am running into some pretty major issues using the datagrid's
dgNUmberOfRecords/GetDataForLine functionality.

First issue.

I load data into the datagrid by setting the dgNumberOfRecords -
GetDataForLine is called correctly, all looks fine.  Now I go through a
filtering process and set the dgNUmberOfRecords again, let's say it ends up
at 2.  GetDataForLine gets called twice and I see that I load the correct
data into pDataA.  The datagrid now correctly shows two lines but they have
the data from the first two lines of the original display, not the selected
lines.  Bad news.

Second Issue.

This one seems to happen when the total number of rows in the datagrid is
an exact multiple of the visible rows in the datagrid.  For example, let's
say there are 50 records presented to the datagrid and it has 10 visible
lines.  No problem with the initial display of the data.  Now I want to add
a row of data to the end of the datagrid.  I set the dgNumberOfRecords to
the new row count but the datagrid still shows the original last row at the
end of the datagrid and I cannot scroll down any further.  I try scroliing
up and down, no joy.  Bad News.


Trevor or zryip, or anyone else - any ideas?

-- 
Pete
lcSQL Software <http://www.lcsql.com>



More information about the use-livecode mailing list