large number of columns to be displayed in List View

  • 17 June 2020
  • 2 replies
  • 85 views

Badge +7

Hi,

My requirement is to display around 45 columns and hiding 20 columns in listview. 

 

My problem is list view allow minimumn 2% width and total allowing only 100% to set. How i can provide % width to each column so that it display header in single line or in 2,3 lines instead of 1 character at one line?


15520i88227ADBC8EA570F.png


2 replies

Badge +15

You can try configuring the width of the columns manually, but considering the number of columns you have, that's going to be tough.


 


By default, the width of the view should be based on the width of your form. If you do not mind horizontal scrolling, you can increase the width of your form, and set your view width to stretch to 100%. That way there are more space for your columns to stretch and  display and column header in one line.


 


If you do not set the width of the form, then the form should stretch itself to whatever width your browser is using. Maximise your browser window, and you should get the same width as your display's resolution's width. If your display's resolution is not enough to fit all the columns without compressing the width of the columns, then the only solution is to increase the width of your form to go beyond the width of your display's resolution. But doing so will introduce a horizontal scrollbar to your form.


 

This might be some handy JS that you can inject to utilise horizontal scrollbars:


 


Add the following in a data label with the literal property selected 


 


<script>$('div[name="View Name"]').find(".grid-body").find(".scroll-wrapper").css({"max-height":"435px", overflow:"auto"});</script> 


 


Here is another (maybe shorter, quick & dirty way) of enabling horizontal scroll on a list view: 


 


$(".grid-body").css("overflow","scroll"); 


$(".grid-body").children().css("width","3000px"); 

Reply