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

Append To Exiting Table Additional Data Problem

$
0
0

Problem: I want to push data row by row to a table so it does not re-draw the whole table ( ie table.setData(tableData); )

After I run through the normal process of creating a row I check and see if it is row 0... if it is I push the data and create the table

If it is row 1 or greater I want to just amend. This is where my problem occurs.

When running tableData.appendRow(row); I get "Uncaught TypeError: undefined is not a function".

T

var tableData = [];
 
for (var i = 0; i < parseddata.length; i++) { etc etc etc.............
 
var row = Ti.UI.createTableViewRow({ etc etc etc.............
 
                // apply rows to data array
                row.add(labelDesc);
                row.add(img);
                row.add(labelDetails);
                row.add(labelDist);             
 
                // and push this into our table
                if (i == 0) {
                    // Create and push
                    tableData.push(row);
                    eventslisttable.setData(tableData);                 
                } else if (i > 0) {
                    tableData.appendRow(row);
                };

Viewing all articles
Browse latest Browse all 680

Trending Articles



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