Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You don't need two tables; one table view, set to grouped, with separate sections will suffice. That way scrolling works perfectly, and editing works across the entire table. I'm not sure why editing is only working for one section for you, but I've put together an example which shows editing working across multiple table sections. To run it, create a project and replace the content of app.js with the following:</p> <pre><code>// Windows var root = Ti.UI.createWindow(); var window = Ti.UI.createWindow({ title: 'Keyboards', showNavBar: true }); // Create table var table = Ti.UI.createTableView({ editable: true, style: Ti.UI.iPhone.TableViewStyle.GROUPED }); // Create section 1 - this section is editable var section1 = Ti.UI.createTableViewSection(); var row1 = Ti.UI.createTableViewRow({title:"English (UK)"}); var row2 = Ti.UI.createTableViewRow({title:"Chinese - Simplified"}); section1.add(row1); section1.add(row2); // Create section 2 - this section is not editable var section2 = Ti.UI.createTableViewSection(); var row3 = Ti.UI.createTableViewRow({title:"French", editable: false}); var row4 = Ti.UI.createTableViewRow({title:"Spanish", editable: false}); section2.add(row3); section2.add(row4); // Add data to the table var data = [ section1, section2 ]; table.data = data; window.add(table); // Set up the buttons var edit = Titanium.UI.createButton({ title:'Edit' }); edit.addEventListener('click', function() { window.setRightNavButton(cancel); table.editing = true; }); var cancel = Titanium.UI.createButton({ title:'Cancel', style:Titanium.UI.iPhone.SystemButtonStyle.DONE }); cancel.addEventListener('click', function() { window.setRightNavButton(edit); table.editing = false; }); window.setRightNavButton(edit); // Add the window to the nav view and open var nav = Ti.UI.iPhone.createNavigationGroup({ window: window }); root.add(nav); root.open(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload