or
@(Html.Kendo().Grid<McGladrey.DOTT.DataAccess.EngagementStatusDataItem>() .Name("grid") .Columns(columns => { columns.Bound(c => c.ClientName).Width("9%").Title("Client Name"); columns.Bound(c => c.ClientNumber).Width("7%"); columns.Bound(c => c.TaxYear).Width("7%"); columns.Bound(c => c.EngType).Width("7%").Title("Eng Type"); columns.Bound(c => c.MasterClient).Width("7%"); columns.Bound(c => c.Assembler).Width("7%"); columns.Bound(c => c.Status).Width("7%"); columns.Bound(c => c.Amended).Width("9%"); columns.Bound(c => c.ReturnTypes).Width("10%"); columns.Bound(c => c.EIMessage).Width(175).Title("Comments"); columns.Bound(c => c.ToDoUsers).Width("9%").Title("To Do"); columns.Bound(c => c.eUpdated).Width("10%").Title("Last Updated").ClientTemplate("#= eUpdated ? kendo.toString(kendo.parseDate(eUpdated), 'MM/dd/yyyy') : '' #"); columns.Bound(c => c.IsInEngagement).Width("10%"); }) .HtmlAttributes(new { style = "height: 380px;" }) .ClientDetailTemplateId("template") .Scrollable() .Sortable() .Pageable(pageable => pageable .Refresh(true) .PageSizes(true) .ButtonCount(5)) .Events(events => events .DataBound("dataBound") .DetailExpand("expand")) )</div><script id="template" type="text/x-kendo-template"> @(Html.Kendo().Grid<McGladrey.DOTT.DataModel.WorkSiteDOTT.IManWorkspaceSerializeable>() .Name("grid_#=eFolderID#") .Columns(columns => { columns.Bound(ws => ws.Name).Width(110); columns.Bound(ws => ws.Owner).Width(110); columns.Bound(ws => ws.CreationDate).ClientTemplate("\\#= CreationDate ? kendo.toString(kendo.parseDate(CreationDate), 'MM/dd/yyyy') : '' \\#"); columns.Bound(ws => ws.Description).Width(200); }) .DataSource(dataSource => dataSource .Ajax() .Read(read => read .Action("WorksiteRequest", "Admin", new { clientNumber = "#=ClientNumber#", taxYear = "#=TaxYear#", amended = "#=Amended#", engType = "#=EngType#" }) ) ) .Events(events => events.DataBound("dataBinding")) .HtmlAttributes(new { style = "height: 180px;" }) .ToClientTemplate() )</script><script type="text/javascript"> function dataBound() { this.expandRow(this.tbody.find("tr.k-master-row").first()); } function dataBinding() { alert("here"); } function expand(e) { alert("in expand"); } $("#ok").bind("click", function (e) { var dataSource = new kendo.data.DataSource({ transport: { read: { url: "/Admin/EngagmentRequest", dataType: "json", data: { ClientNumber: $('[name=clientNumber]').val(), ClientName: $('[name=clientName]').val(), TaxYear: $('[name=taxYear]').val() } } } }); dataSource.pageSize(5); var grid = $("#grid").data("kendoGrid"); grid.setDataSource(dataSource); });</script>.Editable(e => e.Mode(GridEditMode.PopUp).TemplateName("CustomEdit").Window(w => w.Title("Edit").Name("customedit").Width(1000)))[HttpPost]public ActionResult UpdateView(Project project){ var pipelineProject = project; ViewBag.IsUpdate = true; return PartialView("_CreateUpdateProject", pipelineProject);}[HttpPost]public ActionResult UpdateViewForProjectDocumentGuid(string projectDocumentGuid){ var projectRepository = new ProjectRepository(SystemConnection, CurrentUser, WebConfigHelper.GetConfigurationValue("DefaultProgram")); var pipelineProject = projectRepository.Read(new ProjectSearchModel() { AccountNames = AccessibleProjects.Select(a => a.ProjectAccountName).ToList(), DocumentGuid = projectDocumentGuid}).First(); ViewBag.IsUpdate = true; ViewBag.CollapseGeneral = true; return PartialView("_CreateUpdateProject", pipelineProject);}$('#timerequest-details').attr('disabled', 'disabled');$($('#editorName').data().kendoEditor.body).attr('contenteditable',false)
Hello,
after the page containing the tree view is refreshed, the state isn’t remembered so the tree view is collapsed totally. We have the requirement that the state is unchanged on a refresh or navigation operation on the browser.
So our question: Is it possible to store the state in any way (cookies etc.) to restore it on a page load?
Thanks in advance.