Change Tableview Style dynamicly

You must Login before you can answer or comment on any questions.

Hey,

i am trying to change the style of my tabelview dynamicly....

memberTableView.setStyle(Ti.UI.iPhone.TableViewStyle.PLAIN);
But it doesn't seem to work .... Any idea?

1 Answer

Hi Nico

Not possible I am afraid, I think this is a fault of the documentation suggesting it is possible when it is not.

Just to check - I have done a series of tests for example;

  • Just asking it to change
  • Forcing a setData() right afterwards
  • With and without headerViews and footerViews
  • Changing before the table is added to the parent view/window
  • From plain to grouped and grouped to plain.

No combination I tried resulted in the table style changing once the table has been set.

Sorry

— answered 10 months ago by Malcolm Hollingsworth
answer permalink
2 Comments
  • Hi,

    thanks for your help - anyway :) So i have to delete my old Table and create a new One, each time?

    (Should i insert this as a bug?)

    — commented 10 months ago by Nico Barelmann

  • I do not think it is a bug with the code, I imagine it is a limitation, as most uses would leave the table one way or the other. The documentation however should be updated.

    And yes for at least the moment you will have to remove the old one and recreate.

    I hope this answers the question.

    — commented 10 months ago by Malcolm Hollingsworth

Your Answer

Think you can help? Login to answer this question!