fixed bug with layout with hidden columns

Added a new property visibleColumns and use that in the templates for calculating colspan for table layout