DataGrid Question

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
SChamblee
Posts: 19
Joined: Wed Jun 24, 2015 7:45 pm

DataGrid Question

Post by SChamblee » Thu Aug 13, 2015 4:14 pm

I'm using the following script in my DataGrid

on selectionChanged
put the dgHilitedline of me into theLine
end selectionChanged

I've also try with on mouseUp.

This script works on Windows, but when I test on an android device then theLine is empty, so it appears hilite is not firing on the Android, what am I missing ?

Thanks

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: DataGrid Question

Post by Klaus » Thu Aug 13, 2015 5:18 pm

Hi SChamblee,

did you declare theLine as LOCAL or GLOBAL?

And remember that "selectionchanged" comes with 2 parameters that you can use:

Code: Select all

on selectionChanged pHilitedIndex, pPrevHilitedIndex
  put pHilitedIndex into theLine
end selectionchanged
Best

Klaus

SChamblee
Posts: 19
Joined: Wed Jun 24, 2015 7:45 pm

Re: DataGrid Question

Post by SChamblee » Thu Aug 13, 2015 7:51 pm

Thanks Klau

I'm getting the same results, it works on my windows desktop machine but not on my android device.

I had declared theLine as a local variable. I also tested as global and got the same results.

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: DataGrid Question

Post by Klaus » Thu Aug 13, 2015 8:25 pm

SChamblee wrote:Thanks Klau
I'm Klaus, with an S! 8)

Hm, sorry, no brilliant idea...
What version of LC are you using?

SChamblee
Posts: 19
Joined: Wed Jun 24, 2015 7:45 pm

Re: DataGrid Question

Post by SChamblee » Fri Aug 14, 2015 8:07 pm

Klaus

Sorry about the typo with your name.

I have been using 7.1 but I also download 7.0.6 and tested and I have the same issue.

I have also tested the data grid sampler and it works correct on both android and desktop.

With new data grid : On the desktop when I select a row it is highlighted and returns the row number, on android the row is not highlighted and no row is returned. It appears that the auto-hilite is not working to select the row.

SChamblee
Posts: 19
Joined: Wed Jun 24, 2015 7:45 pm

Re: DataGrid Question

Post by SChamblee » Sat Aug 15, 2015 6:06 pm

I created a new test stack, I place items in the contents manually and ran this sample on my computer and on my android device and the data grid works correctly. If I populate the data grid from a sql database then the data grid stops working correctly on android. You can select items in the data grid but none of the items when selected hi-lite so none of the dg commands will return a row number nor will it display the data in the row.

I assume this must be a bug since it will work on windows as expected.

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: DataGrid Question

Post by Klaus » Mon Aug 17, 2015 1:15 pm

Hi SChamblee,

hmm, don't think its a bug, it definitively should work on Android, too!

How did you set up your standalone?
Are you using the "splash screen" approach?
Or is the datagrid in a substack?


Best

Klaus

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”