On selecting a row in a DG table.

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: Klaus, FourthWorld, heatherlaine, kevinmiller

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

On selecting a row in a DG table.

Post by CAsba »

Hi,
In my current interface, the user is asked to select a customer - a row in the DG, the click on button "Continue".
Is it possible that user clicks on line and this action invokes the button "Continue", (so the button doesn't even have to be visible).
Something like...On Selection in the DG handler ???
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: On selecting a row in a DG table.

Post by Klaus »

Hi CAsba,

put this into the script of your datagrid group (NOT into any behaviour!)

Code: Select all

on selectionChanged pHilitedIndexes, pPreviouslyHilitedIndexes
  ## add your button code here...
end selectionChanged
Now everytime the user click on a row, the code will be executed.


Best

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

Re: On selecting a row in a DG table.

Post by CAsba »

Klaus, Thanks for that. It works wonderfully. How do you know such rare gems ?
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: On selecting a row in a DG table.

Post by Klaus »

I always sleep with the complete LC docs under my pillow! :D
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10507
Joined: Wed May 06, 2009 2:28 pm

Re: On selecting a row in a DG table.

Post by dunbarx »

I sleep with the "Complete Works of Klaus" under mine. Still waiting for enlightenment...

Craig
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: On selecting a row in a DG table.

Post by Klaus »

:lol: :lol: :lol:
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: On selecting a row in a DG table.

Post by Klaus »

OK, I am using LC and its ancestors (Metacard, Runtime Revolution, Revolution) since 1999
and have a very good memory, that's my secret. :-)
Post Reply