Page 1 of 1

problem with datagrid

Posted: Thu Sep 14, 2023 11:30 am
by CAsba
Hi,
Not sure if I should be reporting a bug, or if it's something you guys may be able to help with.
On re-starting my project my datagrid 1 of card "custlist" showed no data. I entered and saved a new record and all the disappeared data re-appeared, so, no problem there, just a niggle. But then I noticed that the vertical scroll scroller has disappeared - the up and down arrows are visible but inoperative, so no means in the IDE to access all the lines of data. In the DG properties the V. scrollbar selection is TRUE, and I re-cycled the setting with no success. I'm in Windows 10 but I'd be surprised if it were a Windows fault. I'm in Livecode V 10.00(dp4). Sure, I could revert to V 9.6.9 but I had another problem in 9.6.9 with the ASK and ANSWER which is why I'm in 10.00. Does anyone know of a quick solution to restoring the vertical scrollbar ?

Re: problem with datagrid

Posted: Thu Sep 14, 2023 4:51 pm
by stam
It may be a data issue.
Remember data in the data grid’s array needs to be keyed numerically.

To check, open the ciustom properties section of its property inspector and select “dgCache” from the drop down menu.

It should show the DG’s array and a second list variable specifying the order of the array’s indexes.

The array needs to be in the format

Code: Select all

1 > data for index 1
2 > data for index 2
3 > data for index 3
….
n > data for index n
If it’s not numerically keyed like that, very odd display issues will crop in.

Re: problem with datagrid

Posted: Fri Sep 15, 2023 11:21 am
by CAsba
Hi Stam,
I just did some experimenting. I made a new DG which, on loading from the tools pallette, showed no vertical slider. After I inputted 6 lines of data, still no slider, BUT, on the seventh row of data input, the slider appeared ! How do I manage to find so many ways to waste my time on things like this ?
Anyway, thanks for your interest Stam.

Re: problem with datagrid

Posted: Fri Sep 15, 2023 2:36 pm
by stam
Do you have the slider set to “auto”?
I ask because I see the vertical scroll bar *always* if set to true, regardless of what data is or isn’t there. The only time I see it appearing after data entry is if I’ve set it to “auto” and the rows can’t all be displayed…