Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-2810

Changing table row BG color doesn't redisplay with new color

    Details

      Description

      {html}<div><p>Example code:</p>
      <pre>
      <code>var win = Ti.UI.createWindow({backgroundColor:"white"});

      // create table view data object
      var rows = [
      Ti.UI.createTableViewRow({title:'Row 1'}),
      Ti.UI.createTableViewRow({title:'Row 2'}),
      Ti.UI.createTableViewRow({title:'Row 3'}),
      Ti.UI.createTableViewRow({title:'Row 4'})
      ];

      var tableview = Titanium.UI.createTableView({
      data:rows
      });

      var tableRowSelect = function(rows, index, tableView) {
      for (var i=0;i<rows.length;i++) {
      Ti.API.log('Checking row index '+i);
      if(i == index) { Ti.API.log('Selected'); rows[i].backgroundColor = '#fff'; } else { Ti.API.log('Deselected'); rows[i].backgroundColor = '#d6d6d6'; }
      }
      };

      tableview.addEventListener('click', function(e) {
      tableRowSelect(rows, e.index, tableview);
      });

      win.add(tableview);
      win.open();</code>
      </pre></div>{html}

        Attachments

          Activity

            People

            • Assignee:
              stephentramer Stephen Tramer
              Reporter:
              stephentramer Stephen Tramer
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-2451
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration