Major Datagrid Issues
Peter Haworth
pete at lcsql.com
Tue Apr 17 18:08:17 EDT 2012
Thank you zryip, that fixed both problems. I had found another solution
which was to set the dgtext to empty. I initially thought that wouldn't
work since the internal dg storage is not supposed to exist when use
dgNumberOFRecords. I feel more comfortable with your solution though,
Thanks,
Pete
Pete
lcSQL Software <http://www.lcsql.com>
On Tue, Apr 17, 2012 at 11:22 AM, zryip theSlug <zryip.theslug at gmail.com>wrote:
> Hi Pete,
>
> Sorry for the delay in the answer, I've just read your post.
>
>
> Have you tried to send a ResetControl command to the datagrid, before
> to change the dgNumberOfRecords property?
>
> Example:
>
> command PopulateMyDataGrid
> doMySQLStuff
>
> send "ResetControl" to grp "myDataGrid"
> set the dgNumberOfRecords of grp "myDataGrid" to tNumberOfRecords
>
> end PopulateMyDataGrid
>
> On Sat, Apr 14, 2012 at 3:57 AM, Peter Haworth <pete at lcsql.com> wrote:
> > 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?
>
>
> Best Regards,
> --
> -Zryip TheSlug- wish you the best! 8)
> http://www.aslugontheroad.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list