Tengo una tabla que se desarrolló en una página de SharePoint con clasificación de columnas. Hay un botón Imprimir en la página que imprime lo siguiente:
case "Print": var url = edmscPage.WebRelativeUrl + "/SitePages/PrintFilePlan.aspx?FilePlanId=" + FilePlan.Id + "&SourceUrl=" + encodeURIComponent(window.location.href); window.open(url); edmscPage.HideWaitScreenDialog(); break;El JS para la clasificación es:
CreateClickableSortElement: function(name){ var clickElement = edmscForm.CreateElement("span", [{Key: "onclick", Value: "FilePlanSortManager.MutationSortFilePlanItems(this)"}, {Key:"data-colname", Value: name}, {Key:"class", "Value":"sort-arrows"}], "↑↓"); return clickElement; }, MutationSortFilePlanItems: function(onclickElement){ // Get the stored element column name attribute. var colName = onclickElement.getAttribute("data-colname"); // Get our local mapping from the DOM column name. var mapping = GetColumnMapByDisplayName(colName); // To prevent weird behavior, reset everything (else) to the default ascending sort order. ResetUnusedMappings(colName); // Roll out the sorting property against the data objects in the back end. var sortProperties = mapping.DataColumns; // This starts as false on page load, so we flip early to make ascending our default sort order. // This keeps the variable in line with expected behavior, rather than the expected next stage. mapping.SortAsc = !mapping.SortAsc; FilePlanItem.Items.sort(function (a, b) { var comparisonStringA = ""; var comparisonStringB = ""; for(var s in sortProperties){ var property = sortProperties[s]; comparisonStringA += a[property]; comparisonStringB += b[property]; } return comparisonStringA.localeCompare(comparisonStringB); }); if(!mapping.SortAsc){ FilePlanItem.Items.reverse(); } document.getElementById("rrsFilePlanItems").innerHTML = ""; FilePlanForm.LoadItemsSection(); } } })(FilePlanSortManager);Cualquier página que se imprime pierde su clasificación. Quiero poder tomar esa clasificación que tiene el usuario final y aplicarla a la página impresa.
Gracias