Hello to all,
According to the documentation I can have an extra filed in my schema.model something like "sizeInPxl"? How can I get it displayed in imageBrauser listView? I'm assigning imageBrauser listView to variable and then:
ImageBrowserListView.setOptions({
template: "<li>#:name# #:sizeInPxl#</li>"
});
It works. But the default template is overridden and everything is falling apart.
Another approach is to add the value of this additional field in listView dataBound event, but I don't like it either
ImageBrowserListView.bind("dataBound", function(e){
$.each(e.sender.items(), function(index, value){
ar $value = $(value),
dataSourceItem = e.sender.dataSource.getByUid($value.data("uid"));
// Add HTML element to $value with content dataSourceItem["sizeInPxl"]
});
});
According to the documentation I can have an extra filed in my schema.model something like "sizeInPxl"? How can I get it displayed in imageBrauser listView? I'm assigning imageBrauser listView to variable and then:
ImageBrowserListView.setOptions({
template: "<li>#:name# #:sizeInPxl#</li>"
});
It works. But the default template is overridden and everything is falling apart.
Another approach is to add the value of this additional field in listView dataBound event, but I don't like it either
ImageBrowserListView.bind("dataBound", function(e){
$.each(e.sender.items(), function(index, value){
ar $value = $(value),
dataSourceItem = e.sender.dataSource.getByUid($value.data("uid"));
// Add HTML element to $value with content dataSourceItem["sizeInPxl"]
});
});