problem with datagrid

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
CAsba
Posts: 431
Joined: Fri Sep 30, 2022 12:11 pm

problem with datagrid

Post by CAsba » Thu Sep 14, 2023 11:30 am

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 ?

stam
Posts: 3069
Joined: Sun Jun 04, 2006 9:39 pm

Re: problem with datagrid

Post by stam » Thu Sep 14, 2023 4:51 pm

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.

CAsba
Posts: 431
Joined: Fri Sep 30, 2022 12:11 pm

Re: problem with datagrid

Post by CAsba » Fri Sep 15, 2023 11:21 am

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.

stam
Posts: 3069
Joined: Sun Jun 04, 2006 9:39 pm

Re: problem with datagrid

Post by stam » Fri Sep 15, 2023 2:36 pm

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…

Post Reply