More Data Grid Difficulties - Making it request data

Len Morgan len-morgan at crcom.net
Tue Mar 16 00:15:34 EDT 2010


I found the manual pages for coloring lines in a data grid table but 
it's not working.  I'm pretty sure that the reason is because I'm 
settting the dgText to the array I create from the database records and 
that is bypassing the FillInData routine.

I guess what I need to do is only fill in the records when asked for by 
the data grid.  How exactly would I do that?  I need to keep the records 
in the order they come in from the database but once they are in the 
table, they could be changed as long as I could get back to the correct 
line number in my variable.

I do NOT need to edit any of the data in the grid.  It's only purpose is 
to display a list of people that are returned from a query (made up on 
the spot based on the fields the user types in).  They need to be able 
to scroll the list (could be as many as 300 names) and they need to be 
able to double click on a line to select that person.  As long as I can 
get the data from the first column, I can manage the rest (in fact, that 
part is working fine right now.

I read the entire query result in rather than using a cursor so the 
examples in the data grid manual I don't think are going to help.

Is there a way I can:
1) Do the query
2) Convert the results into a tab/return delimited list of "records"
3) Tell the data grid to start filling in the data and "request" the 
line numbers from me

I have 1 and 2 done.  All I need is a way to tell the data grid to start 
requesting the visible rows and (hopefully) pass me the line number it 
wants (which will match up with my line numbers).  After that, I think 
the colorization routines will fire and do their thing.

Thanks!

len morgan



More information about the use-livecode mailing list