Datagrid blessing or nightmare
Moderator: Klaus
Datagrid blessing or nightmare
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.
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.
Last edited by sphere on Thu Jul 26, 2018 2:16 pm, edited 1 time in total.
-
- Posts: 738
- Joined: Thu Sep 11, 2014 1:49 pm
Re: Datagrid blessing or nightmare
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
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).
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
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.
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
Don't get me wrong, i've never said or was giving the intention that i disliked them. I really like them!!

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
mucho baddo thanger
Re: Datagrid blessing or nightmare
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
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?

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?
Last edited by sphere on Fri Jul 27, 2018 4:13 pm, edited 1 time in total.
Re: Datagrid blessing or nightmare
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
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.As I said, I can see why they are there, but they sure aren't my "go to" grid for doing almost anything.
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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Datagrid blessing or nightmare
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).


Are you sure you meant "by" and not "at"



Re: Datagrid blessing or nightmare
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.sphere wrote: ↑Fri Jul 27, 2018 11:00 ami'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
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com