Morning all
I have a table populated from a database and after a quick server call it identifies the relevant row to show. I then use scrollToIndex to put the row in the middle of the screen.
rowID = tableView.getIndexByName(RowNumber); tableView.scrollToIndex(rowID,{ position:Titanium.UI.iPhone.TableViewScrollPosition.MIDDLE,animated:true,});I now want to change that single rows background and height? How do i target the single row without clicking on it?
the row is built up with
var row = Ti.UI.createTableViewRow({ backgroundImage:rowImage, path: pathname, name: 'row'+msg.fieldByName('JID') ...... });Its on Mobile iOS 5.1
Many thanks in advance
Mark
4 Answers
should have been this
tableView.updateRow(rowID,{backgroundColor:'green'});
Have you tried:
tableView.data[rowID].backgroundColor='green';
Hi Veer
unfortunately im getting this error with that code
message = "'undefined' is not an object (evaluating 'tableView.data[rowID].backgroundColor='green'')";
Im now managing to change the row but it removed all the other data associated with it.
tableView.updateRow(rowID,{background:300});Anyway to just target the background?
Your Answer
Think you can help? Login to answer this question!