Page 1 of 2

Datagrid blessing or nightmare

Posted: Thu Jul 26, 2018 12:25 pm
by sphere
Well that's maybe a bit rough said, because it let's us do things unbelievable.
But it can be very frustrating too.
One thing not to do is copy a DG to another stack or even in it's own stack.
Better is to start every time with a new DG even if more are needed in one stack and (re)create the (row)template needed for it.
or else....i found that copying a dg to another stack and even to another card that it does not do what you've expected.
The exact same script to fill the DG does simply not work, although it did before. Deleting one of the grids and adding a new one again, recreating the row-template and again the same script added suddenly does work.
Really frustrating and searching for the unfindable needle in the haystack.

Refreshing the DG did not help.
dispatch "ResetList" to group "DataGridName" did not help.
With strange things in LC i also tend to rename the preferences file so LC will create a fresh one, but also that did not help.
So as advise start every DG from scratch, do not copy. You can copy scripts from a textfile or so.

Re: Datagrid blessing or nightmare

Posted: Thu Jul 26, 2018 1:33 pm
by mrcoollion
I think Data-grid's is great and I use then a lot, but I do agree that one should build it up from scratch and not copy.

Re: Datagrid blessing or nightmare

Posted: Thu Jul 26, 2018 3:50 pm
by bogs
And I am apparently in between you two, I almost never use them because, compared to other languages I've used the equivalent to a dg in, they either require a lot of setup or almost none at all (but you can't then access all their features).

When I do use them, I tend to use them strictly for the simplest end of what they can do, and since that is the case, I generally wind up far more using fields, which behave exactly as I expect them too.

Long wind up short, I can see why they are there, but almost never using them myself makes their importance to me less (probably than it should be).

Re: Datagrid blessing or nightmare

Posted: Thu Jul 26, 2018 3:54 pm
by Mikey
dg's use template substacks and other behaviors that cause VBT. I think you can set them to act like backgrounds, though, and add the background to other cards in the same stack.
Now that Trevor is going hard-core YML, maybe we'll get DG 2.1 that you just configure in YML and can easily use between stacks.

Re: Datagrid blessing or nightmare

Posted: Thu Jul 26, 2018 10:09 pm
by sphere
bogs wrote:
Thu Jul 26, 2018 3:50 pm
And I am apparently in between you two,
Don't get me wrong, i've never said or was giving the intention that i disliked them. I really like them!! :D
Except i found that copying them is giving a bad headache, that you can't find the cause of not doing what it does normally, until you renew it completely with the exact same scripts.

Re: Datagrid blessing or nightmare

Posted: Thu Jul 26, 2018 10:11 pm
by sphere
Mikey wrote:
Thu Jul 26, 2018 3:54 pm
VBT.
Please explain what you mean with VBT, thanks.

Re: Datagrid blessing or nightmare

Posted: Thu Jul 26, 2018 10:16 pm
by Mikey
mucho baddo thanger

Re: Datagrid blessing or nightmare

Posted: Fri Jul 27, 2018 10:34 am
by bogs
sphere wrote:
Thu Jul 26, 2018 10:09 pm
bogs wrote:
Thu Jul 26, 2018 3:50 pm
And I am apparently in between you two,
Don't get me wrong, i've never said or was giving the intention that i disliked them. I really like them!! :D
I didn't say you did, I said my feeling about them falls in between yours and mrcoollion's, although I probably put my opinion in the wrong part of the line up, and maybe should have said it falls below yours and mrcoollion's, or that I have less of an opinion about them.

I think they are a blessing *if* you just need a simple grid that is instantly (but wrongly [no setup of the template]) usable with moving / resizeable columns that looks good {but of course, you could also use Bern's ModTableField, or roll your own version as well}.

I think setting them up to make use of their potential is a nightmare and very confusing even to long term users of the language (which I am not, only being a 1 year old as it were) as compared (like I said) to similar controls in previous languages I've written in, such as Delphi, basic(s), etc. where setup and use of the control is more obvious and only very slightly harder than setting up a table field.

I think that the control itself is a wonder of code in a way, as I've looked through it, but is just more complication than I myself need or want to use, and while I wouldn't call them a 'nightmare', they sure aren't all sweet dreams even to learn about, never mind get full use of.

As I said, I can see why they are there, but they sure aren't my "go to" grid for doing almost anything.

Re: Datagrid blessing or nightmare

Posted: Fri Jul 27, 2018 11:00 am
by sphere
i'd be interested in Bern's ModTableField, where can i get it? :)

edit ***found it ! *** wel...thought i found it but the link i found is not working anymore, and there is something else from Bernd in the samplestacks, but i'm not sure if that is the same thing.

Anyone a link or zip?

Re: Datagrid blessing or nightmare

Posted: Fri Jul 27, 2018 1:47 pm
by Mikey
I've been messing with MTF on mobile but ran into some issues with it. Bernd is aware. I don't know if he can fix them or not.

Re: Datagrid blessing or nightmare

Posted: Fri Jul 27, 2018 7:00 pm
by jacque
As I said, I can see why they are there, but they sure aren't my "go to" grid for doing almost anything.
Datagrids were designed to hold large amounts of data that would otherwise be difficult or impossible for a normal field to manage. This is usually large result sets returned from a database. Their main attraction is the ability to dynamically load and scroll data as needed when a field isn't practical. Since I almost never need to do this, I don't use them much because a field is easier to maintain.

There is a perception that datagrids are intended for any data that needs columns and rows, and new users often choose them first when a field would do just as well. They are a workable choice for some types of form datagrids, though I usually find it easier to use duplicated template groups.

However, those who work with large databases swear by datagrids.

Re: Datagrid blessing or nightmare

Posted: Fri Jul 27, 2018 8:30 pm
by bogs
Absolutely Jacque, luckily for me, the largest dataset I have to handle is still well below 10k records, and unlikely to ever get above that (in my lifetime).
jacque wrote:
Fri Jul 27, 2018 7:00 pm
However, those who work with large databases swear by datagrids.
Are you sure you meant "by" and not "at" Image

:mrgreen:

Re: Datagrid blessing or nightmare

Posted: Fri Jul 27, 2018 8:38 pm
by bogs
sphere wrote:
Fri Jul 27, 2018 11:00 am
i'd be interested in Bern's ModTableField, where can i get it? :)

edit ***found it ! *** wel...thought i found it but the link i found is not working anymore, and there is something else from Bernd in the samplestacks, but i'm not sure if that is the same thing.

Anyone a link or zip?
I hope Bernd will let me know if he doesn't want me to share this publicly, but for now, I've sent you a pm with a link to it.

Re: Datagrid blessing or nightmare

Posted: Fri Jul 27, 2018 8:40 pm
by jacque
bogs wrote:
Fri Jul 27, 2018 8:30 pm
Are you sure you meant "by" and not "at"
Well, maybe both. :)

Re: Datagrid blessing or nightmare

Posted: Fri Jul 27, 2018 8:59 pm
by Mikey