Naman Jain
Naman Jain

Reputation: 1

Enable horizontal scroll bar in table in jqgrid

I am facing issue to enable horizontal scroll when grouping text does not fit in table width is present in jqgrid.

The table width is approx 50% of the screen and grouping text length is 300 characters after adding overflow property to the table no scroll bar is being added and text is getting hidden.

Highlight in the image line shows the problem enter image description here

Upvotes: 0

Views: 214

Answers (1)

Manjuboyz
Manjuboyz

Reputation: 7056

use overflow-y:scroll in your table that should take care of that.

Set shrinkToFit : false or make your element set to above mentioned way.

<div style="width:100px;overflow:auto;"><table id="yourTable"></table><div>

You can use CSS for that.

yourTableSelector{
      width:50%;
      overflow-y:scroll;
       }

An example:

.scrolling-wrapper {
  height:100px;
 width:50%;
 border:1px solid red;
  overflow-y: scroll;
 
}
 
<div class="scrolling-wrapper">
  <div>There are two different ways to make these divs scroll horizontally and which path you choose will probably come down to personal preference and/or browser support.
  There are two different ways to make these divs scroll horizontally and which path you choose will probably come down to personal preference and/or browser support.
  There are two different ways to make these divs scroll horizontally and which path you choose will probably come down to personal preference and/or browser support.</div> 
</div>

Upvotes: 0

Related Questions