Hi,
Is there any examples where scheduler is automatically scrolled to current date, but for scheduler created in ASP.NET Core?
This is exactly what I need, but I can't make it work in my ASP.NET Core project: https://www.telerik.com/forums/scheduler-timelinemonth-current-day-visible
My rows.length are always 0, so is my contentDiv.length, when I checked it.
var scheduler = $("#scheduler").getKendoScheduler();
var contentDiv = scheduler.element.find("div.k-scheduler-content");
var rows = contentDiv.find("tr td");
var slot = scheduler.slotByElement(rows[i]);
var slotTime = kendo.toString(slot.startDate, "d");
var targetTime = kendo.toString(time, "d");
if (targetTime === slotTime) {
contentDiv.scrollLeft($(rows[i]).offset().left + contentDiv.scrollLeft() - contentDiv.position().left);
}
};
Hi, Stefan. Thank you for sharing your solution for the ASP.NET Core framework with the community. Indeed, the DataBound event is suitable as it is invoked when the content has been rendered and the data is bound.
Please note that this event is invoked every time server operations with data are initiated. Hence, potentially you could be scrolling the content every time the user interacts with the widget.
If applicable or needed, you could unbind the event by using the unbind("dataBound") method.