Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SharePoint 2013 List Header show all columns

$
0
0

hi

Below is the script don't seems to work when I scroll to the right.  The Stickyheader.js I found on the internet doesn't refresh the page normal.  I had to scroll back to the left when the page fresh.

<style type="text/css">
#LZheading {
    HEIGHT: 36px;
    display:none;
}
.FixedHeader{
    margin-top: -220px; 
    ;
    border-color: black !important;
    background-color:white;
    color:black !important;
    font-weight: bold !important;
    display:block !important
}
#LZheading>table>tbody{
    visibility:hidden;
}
</style>
<script type="text/javascript">
window.onload = function() {
    LZListScroll();
    document.getElementById("s4-workspace").onscroll=function(){
        var LZHead=document.getElementById("LZheading");
        if(this.scrollTop > 200){
            LZHead.classList.add("FixedHeader");             
        }else{
            LZHead.classList.remove("FixedHeader");         
        }
    }
};
function LZListScroll() {
    var LZmyTable=document.getElementsByClassName("ms-listviewtable")[0];
    var insertDiv=  document.getElementsByClassName("ms-csrlistview-controldiv")[0];    
    var LZHeadingDiv = document.createElement('div');
    LZHeadingDiv.appendChild(LZmyTable.cloneNode(true));
    LZHeadingDiv.id = "LZheading";
    insertDiv.parentNode.insertBefore(LZHeadingDiv,insertDiv.nextSibling);
}
</script>


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>