Horizonal and Vertical Scrollbar Around for large List and Doc Lib in Sharepoint

Hi Guys,
if you want horizontal and Vertical scrollbar around large content list and Doc lib instead of around whole page with Frozen header Columns then use script:
<script src=”Path to Jquery file” type=”text/javascript”>
<style type=”text/css”>
.DataGridFixedHeader { position: relative; top: expression(this.offsetParent.scrollTop);}
</style>



<script type=”text/javascript”>
$(function(){
var $table = $(“TABLE[ID^=’” + ctx.listName + “‘]:first”, “#MSO_ContentTable”);
<!–WRAP TABLE IN SCROLL PANE–>
$table.wrap(“<DIV style=’OVERFLOW: auto; HEIGHT: 420px’>”);
<!–FROZEN HEADER ROW–>
$(“TR.ms-viewheadertr:first”, $table).addClass(“DataGridFixedHeader”);

});
</script>

If you want horizontal then set width style in DIV


Note this will work only for list if you want it for Doc lib then replace ID with ‘onetidDoclibViewTbl0’
Ref:http://kjellsj.blogspot.com/2009/06/sharepoint-jquery-scrolling-view-with.html
Enjoy
Thanks
Ron

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s