Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Which event fires when you click the red 'Delete' button on a TableView row?

Hi All,

Can't seem to come up with an answer for this one: I've set my TableView to 'editable: true' so now, when you swipe on the row, the red delete button magically appears (!) and, when you click, the row goes away. Close to good enough – except that the data in the row is contained in a SQLite table and I need to delete it from there as well. So, which event is fired when you click that red button?



— asked November 5th 2010 by Mark Pemburn
  • button
  • editable
  • iphone
  • red
  • tableview

1 Answer

  • Accepted Answer

    Have you tried the 'delete' event?

    // add delete event listener
        var s = e.section;
        Ti.API.info( ' title ' + e.rowData.title);
        Ti.API.info("deleted - row="+e.row+", index="+e.index+",
                                     section="+e.section );
    — answered November 5th 2010 by Aaron Saunders
    1 Comment
    • Thanks - this wasn't specified in the TableView docs.

      — commented January 19th 2012 by Dan Smart
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.