Is there a way to set a fixed column width and height to the Jqgrid.
I changed the jqgrid css to
.ui-jqgrid tr.jqgrow td {vertical-align:text-top;font-weight: normal; overflow: hidden; white-space:pre-wrap; height: 20px !important;padding: 0 2px 0 2px;border-bottom-width: 1px; border-bottom-color: inherit; border-bottom-style: solid;}
but that doesnt set the height to 20px.
I also need to set all rows to a specific height and the data in the columns should be cut off if the size exceeds the size of the column and hovering over the column should show the entire data.
The below is my colName and model
ColNameData = ['Date', 'Fund', 'Partner', 'Menu', 'Sub Menu', 'Document Name', 'Document Description', 'Type', 'ID'];
ColModelData = [{ name: 'MessageDate',
align: 'right',
sorttype: 'date',
datefmt: 'm/d/Y',
width :10,resizable:false
},
{ name: 'Fund', align: 'left',width : 8, resizable:false},
{ name: 'Partner', align: 'left',width : 7,resizable:false },
{ name: 'Menu', align: 'left',width : 9,resizable:false },
{ name: 'SubMenu', align: 'left',width : 9,resizable:false},
{ name: 'Documentname', align: 'left',width : 35,resizable:false },
{ name: 'DocumentDescription', align: 'left',width : 35,resizable:false },
{ name: 'Type', align: 'left',width : 5,resizable:false},
{ name: 'ID', hidden: true, resizable: false }
];
In the jqgrid
properties you will find that the width and height of the jqgrid can be set by the properties width
and height
as given here. The same applies for each row of the jqgrid.
{ name: 'Fund', align: 'left',width : 8, height:20, resizable:false}
The above line will set the height of this cell to 20 px
. So you can set the height
parameter of all columns to ensure a height of the row to 20 px
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With