View chrome: hide the title/header bar and button toolbar

  • 18 August 2014
  • 2 replies
  • 165 views

Hi,

 

We are developing a smartform that has 4 tabs, each tab containing a portion of the entire form's content. The intent is to have a turbotax style wizard, only displaying the information applicable for that point in the process. We have a final tab for reviewing all the entered information (using data transfer rules to populate along the way) and we wanted to re-use the existing views but disable some visual elements on them.

 

We want to hide the View's collapsible title bar and the button toolbar on this review tab. I have seen another forum post related to hiding the view title bar but it mentions custom themes.

 

Is there a view property we can target to turn off the title bar and button toolbar without themes?

 

Thanks in advance,

-Todd

 

 


2 replies

Badge +7

TD,

 

This June, it was noted that this has been logged as a feature request, which means it will potentially be included in a future release of K2 Blackpearl.

However, there were some workarounds I found which suggested the following.

 

  1. For hiding header, you can use the set control's property and select No on the visible property. For hiding the entire column, you can use hide view control rule and select the column name to hide. Please note that the above method will only hide the text.

     

  2. Put the following script in a label: <script>$(document).ready(function () {$('div[title="Plan"]:gt(0)').each(HideMe)});function HideMe(i){$(this).parents('.grid-column-headers').css("display", "none");}</script>

     

  3. The labs team recommended to another client that the OOTB way to remove the header would be to create a new label and put this code in the text field: T<script>$(document).ready(function () {$('div[title="Plan"]:gt(0)').each(HideMe)});function HideMe(i){$(this).parents('.grid-column-headers').css("display", "none");}</script>

I hope this helps! If not, I can do some more research.

 

Regards,

Alyssa

Working Fine.Thank you.

 

Simalarly, the list view toolbar hidden using the below script.

 

<script type="text/javascript">$(function () {$('.grid-toolbars').css("display", "none");});</script>

 

in a label as literal.

Reply