or
@(Html.Kendo().Upload()
.Name(
"attachments"
)
.HtmlAttributes(
new
{ id =
"FilesToUploadWnd"
, style =
"width:100%"
})
.Messages(m => m.Select(
"select files from your computer… "
))
.ShowFileList(
false
)
.Async(async => async
.Save(
"SaveWnd"
,
"Log"
)
)
.Events(e => e
.Success(
"onSuccessWnd"
)
)
)
function
onSuccessWnd(e) {
var
url =
"../FolderName/"
+ e.response.status.toString();
var
elem = document.createElement(
"img"
);
elem.setAttribute(
"height"
,
"70"
);
elem.setAttribute(
"width"
,
"70"
);
elem.setAttribute(
"src"
, url);
document.getElementById(appendID).appendChild(elem);
}
$(
'#contentListView'
).kendoListView({
dataSource: data
, template: kendo.template($(
"#template"
).html())
, selectable:
"single"
, schema: {
model: {
children:
"Children"
, id:
"id"
, hasChildren:
"hasChildren"
}
}
,change: selContentItem
});
function
selContentItem(e) {
//I would expect the following to return true and if it did (and similar logic followed), the next line would work nicely but it doesn't because the first line returns false. Why?
console.log(e.sender == $(
'#contentListView'
).data(
'kendoListView'
));
console.log(e.sender.dataSource.view()[e.sender.select().index()]);
}