Hi Dimiter,
this does not work for me unfortunately :(
i have datasource defined like that:
message_dataSource =
new
kendo.data.DataSource({
transport: {
read: {
url:
"Gps/_Select_Messages"
,
dataType:
"jsonp"
},
parameterMap:
function
(data, type) {
return
{ carId: message_carId };
}
},
schema: {
model: {
id:
"id"
,
fields: {
date: {},
message: {},
fromBoard: {},
delivered: {}
}
}
}
});
then on dataBound event i have the code you provided, however listview does not scoll itself to the end as expected.
This is probably because dataBound event is being called
before the visual part completely constructed in the HTML page and therefore scrollHeight property does not contain it's final value.
I have to modify your code like that to make it working:
var
wrapper =
this
.wrapper;
setTimeout(
function
() {
wrapper.scrollTop(wrapper[0].scrollHeight);
}, 1000);
Anyway, I am not sure if timeouts is a good solution for that.