Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resize of columns in bootgrid

Tags:

jquery

grid

boot

Since there are more number of columns in my bootgrid so the width of column has been reduced in such a way that data is visible partially. So i was thinking of having a facility of user can drag the column size to increase or decrease, or something like whenever user hover the column values and header the data should be visible as a tooltip.. Could you please whether this functionality is possible in bootgrid?

like image 310
user3112954 Avatar asked Nov 30 '14 19:11

user3112954


2 Answers

Use the data-header-css-class attribute on the desired column and set it to your custom class having the desired width :)

<style>
.cgb-header-name {
    width: 50%;
}
</style>
...
<th data-column-id="name" data-header-css-class="cbg-header-name">Name</th>
...

You can also use the data-width attribute and set the value inline

...
<th data-column-id="name" data-width="70%">Name</th>
...
like image 146
Storm Avatar answered Sep 23 '22 16:09

Storm


Work for me.

<th data-column-id="ID" data-type="numeric" data-width="30%">ID</th>

att.

like image 39
simiaofernandes Avatar answered Sep 24 '22 16:09

simiaofernandes