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