or
var iframe = $("#myGrid");var tr = iframe.contents().find("tr[class=k-state-selected]");$(iframe.contentWindow || iframe.contentDocument).scrollTop(tr.offset().top);var myGrid = $("#myGrid").data("kendoGrid");myGrid.select(myGrid.tbody.find("td .key:contains('" + myKey + "')").closest("tr"));@(Html.Kendo().DropDownList() .Name("resources") .OptionLabel("Välj resurs eller sök bland alla...") .DataTextField("ResourceName") .DataValueField("ResourceID") .DataSource(source => { source.Read(read => { read.Action("GetResources", "ComboBox").Data("filterServices"); }) .ServerFiltering(true); }) .Template("<div><strong>" + "${ data.ResourceName }</strong><br/>" + " # if (data.ResourceInformation) { #" + "<em>${ data.ResourceInformation }</em></div>" + " # } #") .Events(x => x.Change("ChangeResource")) .HtmlAttributes(new { style = string.Format("width:{0}px", 340) }) )//// Dropdown 2//@(Html.Kendo().DropDownList() .Name("services") .OptionLabel("Välj tjänst...") .DataTextField("ServiceName") .DataValueField("ServiceID") .DataSource(source => { source.Read(read => { read.Action("GetServices", "ComboBox") .Data("filterResources"); }) .ServerFiltering(true); }) .Template("<div class='displayServices'><strong>" + "${ data.ServiceName } # if (data.ServicePrice) { # Pris: (${ data.ServicePrice }) # } #</strong># if (data.Priority) { # <img style='float: right' src='/Content/images/star.png' /> # } #<br/>" + " # if (data.ServiceInformation) { #" + "<em>${ data.ServiceInformation }</em></div>" + " # } #" + "<hr />") .HtmlAttributes(new { style = string.Format("width:{0}px", 340) }) )function ChangeResource() { $("#services").data("kendoDropDownList").dataSource.read(); } function filterResources() { return { resources: $("#resources").val() }; } function filterServices() { return { service: $("#services").val() }; }// Get scrolltop from HTML or Body (if it is not a frameset page)var scrollTop = window.document.documentElement.scrollTop || (window.document.body) ? window.document.body.scrollTop : 0;if(scrollTop > 0) result.top = result.top - scrollTop;