DataGrid Optimization question

zryip theSlug zryip.theslug at gmail.com
Sat Sep 18 06:08:29 EDT 2010


On Fri, Sep 17, 2010 at 9:31 PM, Andrew Kluthe <andrew at rjdfarm.com> wrote:
>
> Hey revsters,
>
> I use datagrids on a hidden card to hold different sets of data that get
> processed combined  into another datagrid for display to the user.
>
> I am trying to optimize my script and before fetching the data from the
> hidden datagrids.
>
> Before I fetch the data from the grid I send this to the grid in order to
> refresh it and make sure it has the latest data.
>
> send "RefreshList" to group "EditTickets" of card "LocalData"
>
> I noticed from the API Docs for the datagrid that:
>
> RefreshList
> - Redraws the data displayed in the data grid.
>
> Does this simply redraw the data and not at all affect the data that I am
> fetching from the grid with the dgData property? Am I adding overhead to
> redraw a grid that no one sees?

Andrew,

The datas are restore when the preopencontrol of the datagrid is
invoked, so when you go the first time to the "LocalData" card.
Your data is refreshed by storing a new set with the set dgData... statement.

No need here to refresh the datagrid.

Personally and for now, I'm using only hidden datagrids which contains
parameters I wrote myself by hand.
I can sort content of those datagrids, find lines, copy lines and
sample columns with no refresh, and all works like a charm.


Regards,
-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc



More information about the use-livecode mailing list