I am trying to automatically add alphabetical tableview headers, and I have been working from this post: http://developer.appcelerator.com/question/86921/automatically-add-alphabetical-headers-in-tableview
but I am having trouble adapting it for my purpose... Here is what I have now with no headers. It would be great to be able to get alphabetical headers on this.
var sendit = Ti.Network.createHTTPClient(); sendit.open('GET', 'http://www.domain.com/read.php?action=1'); sendit.send(); sendit.onload = function(){ var json = JSON.parse(this.responseText); var json = json.products; var dataArray = []; var pos; for( pos=0; pos < json.length; pos++){ dataArray.push({title:'' + json[pos].name + '', productID:json[pos].id}); // set the array to the tableView themenu.setData(dataArray); }; }; //create tableview var themenu = Ti.UI.createTableView({ style:Ti.UI.iPhone.TableViewStyle.GROUPED, height:410, top:50 });