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 »

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
Contact:

Re: DataGrid How To Delete A Row

Post by Janschenkel »

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 »

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 »

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 »

Thank you very much!
smelly
Posts: 15
Joined: Sat Jan 09, 2021 11:36 pm

Re: DataGrid How To Delete A Row

Post by smelly »

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: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: DataGrid How To Delete A Row

Post by Klaus »

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