DataGrid How To Delete A Row

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
gwbasic
Posts: 34
Joined: Tue Mar 16, 2010 6:39 am

DataGrid How To Delete A Row

Post by gwbasic » Fri Mar 19, 2010 11:25 pm

I just started working on datagrid. Where can I can find an example on how to delete a row in a datagrid?

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Re: DataGrid How To Delete A Row

Post by Janschenkel » Sat Mar 20, 2010 1:43 pm

Take a look at the revLessons section for the Datagrid: http://lessons.runrev.com/spaces/lesson ... s/datagrid

HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

gwbasic
Posts: 34
Joined: Tue Mar 16, 2010 6:39 am

Re: DataGrid How To Delete A Row

Post by gwbasic » Mon Mar 22, 2010 1:11 am

Yes I tried skimming through it but can't find it. I just I want to come up with something very quickly to convince my boss that Rev could be useful to us.

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: DataGrid How To Delete A Row

Post by sturgis » Mon Mar 22, 2010 2:22 am

look at http://lessons.runrev.com/spaces/lesson ... a-Grid-API specifically deleteLine. For a quick test you can type in:

Code: Select all

dispatch deleteLIne to group "yourDatagridGroup" with "1,4,5" 
-- deletes rows 1, 4  and 5 of the datagrid.  

gwbasic
Posts: 34
Joined: Tue Mar 16, 2010 6:39 am

Re: DataGrid How To Delete A Row

Post by gwbasic » Mon Mar 22, 2010 3:05 am

Thank you very much!

smelly
Posts: 14
Joined: Sat Jan 09, 2021 11:36 pm

Re: DataGrid How To Delete A Row

Post by smelly » Fri May 28, 2021 5:41 pm

dispatch deleteLIne to group "source" with "1,2,3"

Does not work for me. It only deletes one line and I cannot tell which it will be. Sometimes its 1 and sometimes its 3.

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

Re: DataGrid How To Delete A Row

Post by Klaus » Fri May 28, 2021 6:02 pm

Hi smelly,

I am sure the threadstarter will have found a solution in the last 11 years! :-)

The devil is in the detail! :D

To delete one LINE use:

Code: Select all

dispatch deleteLIne to group "source" with 1
To delete more than one LINES use:

Code: Select all

dispatch deleteLineS to group "source" with "1,2,3" 
See the tiny difference?
line <> lines


Best

Klaus

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”