Page 1 of 1

How to populate multiple columns in a list item

Posted: Sun Oct 27, 2013 7:33 am
by Bob Fludder

Hi. I understand that to add an item to a list I can
Tiggr('list').append('New item');
Tiggr('list').listview('refresh');
(or use Appery instead of Tiggr) but I have a grid in the list item and 5 columns all containing labels and 1 with an input field. How do I populate these ?


How to populate multiple columns in a list item

Posted: Sun Oct 27, 2013 8:06 am
by Illya Stepanov

Hello Bob,

It should be pretty easy something like this:
pre
Appery('mobilelabel_32').text('NewText');
Appery('mobilelistitem_15').listview('refresh');
/pre
where: 'mobilelabel_32' - is a label name that needs to be updated;
'mobilelistitem_15' - listItem component that will be updated;


How to populate multiple columns in a list item

Posted: Sun Oct 27, 2013 8:58 am
by Bob Fludder

Ok. But when do I do the append (and what do I append) and if that is an update how does it know which item in the list is to be changed ?


How to populate multiple columns in a list item

Posted: Sun Oct 27, 2013 12:03 pm
by Illya Stepanov

It's a standart jQuery method (additional information you can check here)

the selector is defines what element will be modified
pre.append()/pre
Insert content, specified by the parameter, to the end of each element in the set of matched elements.