Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Picker does not work in TableViewRow

I assume I can add controls like switch and textboxes inside table row but putting a picker inside a row doesn't work.
Does anyone gotten a picker control to work in a table row?

— asked March 19th 2010 by Peter Lum
  • control
  • picker
  • row
  • table
2 Comments
  • Peter, did you implement this ?

    — commented June 10th 2011 by Mert Salik
  • picker adding to a table row works

    var picker2 = Ti.UI.createPicker();
    var thisRow1 = Ti.UI.createTableViewRow({
    className: "grid",
    layout: "horizontal"});
    var data = [];
    data[0]=Ti.UI.createPickerRow({title:'orange',custom_item:'O'});
    data[1]=Ti.UI.createPickerRow({title:'Applet',custom_item:'A'});

    picker2.add(data);
    thisRow1.add(picker2)

    Then add the row to the tableview. Thanks

    — commented July 7th 2011 by VINOTH THIRU

1 Answer

  • Nope i believe you cannot add a picker to a row, you'll need to open a window, model preffered, and add the picker to that window. Read the selected value and add that value to a label/textbox on your tableviewRow.

    Thats how i did it, works fine that way.

    — answered June 10th 2011 by Kami -
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.