No right arrow on iPhone tableview
Don't know if its a coding thing, but I thought that the arrow would be added automatically.
My tableview lists the values, and then when I click it it animates and opens up another window.
Any reason why this isn't showing, or do I need to add a property?
var tableview = Titanium.UI.createTableView({
data:data,
editable:true,
backgroundColor:'#ffffff',
fontColor:'#000000',
fontSize:9,
top:0
});
10 Answers
-
Accepted Answer
var data = []; //Get data for tableview var rows = db.execute('SELECT * FROM fishingspots'); while (rows.isValidRow()) { data.push({ id: rows.fieldByName('id'), lat: rows.fieldByName('lat'), lon: rows.fieldByName('lon'), title: rows.fieldByName('caption'), info: rows.fieldByName('info'), hasChild: true }); rows.next(); } rows.close();
This should work
-
If you want the arrow to display you must add the "hasChild" attribute to each row:
var someRow = Titanium.UI.createTableViewRow({ height:46, title:'My Text', hasChild:true });
-
So I'll have to programmatically create rows during my loop when I get the details? I'm not using the createTableViewRow at all
-
So I'll have to programmatically create rows during my loop when I get the details? I'm not using the createTableViewRow at all
-
So I'll have to programmatically create rows during my loop when I get the details? I'm not using the createTableViewRow at all
-
So I'll have to programmatically create rows during my loop when I get the details? I'm not using the createTableViewRow at all
-
No you can include that in your data variable.
-
Good lord, why are there 4 answers of mine that are the same??
-
Could you provide an examples based on my code? Here is the code that actually adds to the table
var data = []; //Get data for tableview var rows = db.execute('SELECT * FROM fishingspots'); while (rows.isValidRow()) { data.push({ id: rows.fieldByName('id'), lat: rows.fieldByName('lat'), lon: rows.fieldByName('lon'), title: rows.fieldByName('caption'), info: rows.fieldByName('info') }); rows.next(); } rows.close();
-
Could you provide an examples based on my code? Here is the code that actually adds to the table
var data = []; //Get data for tableview var rows = db.execute('SELECT * FROM fishingspots'); while (rows.isValidRow()) { data.push({ id: rows.fieldByName('id'), lat: rows.fieldByName('lat'), lon: rows.fieldByName('lon'), title: rows.fieldByName('caption'), info: rows.fieldByName('info') }); rows.next(); } rows.close();