Hi All:
I have below code:
$.ajax({ url:ajaxURL,
dataType : "json",
async : false,
success : function(data){
qModel = new sap.ui.model.json(data);
oListQuestions.setModel(qModel);
oListQuestions.bindItem("/d/results", oTemplateQuestions);
}
})
which works perfectly and I get all the questions displayed in a list. However, I like to bind one row at a time. Is there a way to do this:
oListQuestions.bindItem("/d/results/0", oTemplateQuestions); ?
Note: "/d/results/0" is the first object in the list. Somehow, bindItems() expects an array of objects.
Thanks so much for your help. It is much appreciated.
Cheers,
Ron