Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (multiline)
Viewing all articles
Browse latest Browse all 8

mutiline tablerow from database

$
0
0

hey guys, When I load my tableview from a local database, it doesnt show the whole data. In fact, it just shows the first few letters and then it puts ellipses on the end. Is there a way i can show multiline data from a database? What i would like to do is show the entire title field (approx 30 chars long) as well as an image on the left. posted below is my code

//create a tableview
var tableview = Titanium.UI.createTableView({
        height:310,
    editable:true
});
 
 
 
function setData() {
    //initiate array
    var dataArray=[];
    //bootstrap database
    var db=Ti.Database.install('localfavs.db', 'sqlite_master');
 
    //Exec SQL statement
    var rows = db.execute('SELECT * FROM localsfavorites');
    //logs for trouble shooting 
    Titanium.API.log("rows " +rows);
    //loop while row is valid
        while (rows.isValidRow())
            {
            dataArray.push(
        {title:rows.fieldByName('description'),leftImage:'someImage.png'});
                  //create a new row dynamically    
            rows.next();
            //puts results from above into the tableview
            tableview.setData(dataArray);
     }
 
 
     //close rows
    rows.close();
 
};//setData closer
setData();

Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>