$$("list").add()

Hello

I am trying to add a new row to a existing list, this is my list structure:

{view: 'list',
					id: 'lista',
					type : {
						css : "frame",
						height : "auto",
						width : "auto"
					},
					scroll: true,
					datatype: 'json',
					select : true,
					template : function(obj){
						var html = '<table>'
						+'<tbody>'
						+'<tr><td><b>'obj.name'</b></td></tr>'
						+'<tr><td style="font-size:80%;">'obj.address'</td></tr>'
						+'</tbody>'
						+'</table>'
						+'<table>'
						+'<tbody>'
						+'<tr>';
						


						return html;
					},
					url: "///",
					},

and I want to add a field in the bottom, with only a text, I am trying with this:

 $$('lista').add({
    	template : function(){
			var html = '<table>'
			+'<tbody>'
			+'<tr><td><b>1</b></td></tr>'
			+'<tr><td style="font-size:80%;">2</td></tr>'
			+'</tbody>'
			+'</table>'
			return html;
		}
    
    
    
    
    },6);

But the field only contains “undefined”, how can I add effectively?

Thank you so much for help

By the way, It always appear in top, I want in bottom

The same template function will be used against all items. You can use something like

$$(“list”).add({
name:“my text”,
address:""
}, -1);

second parameter of add allows to define position of adding, -1 means “end of list”