I use FreeJqGrid and i can't resolve my problem. I have two divs, one use to collect information and the other to show in a freejqGrid the result of this collect.
The first div is visible and the second is hidden and when i switch those div, my grid isn't full width. See this Link. So how can i resize it ? I try many answser in SOF like grid.trigger('resize') but nothing work. Here's how i build my grid :
grid.jqGrid({
data: myData,
colNames: ["Matricule","ID CICP","Nom Prénom", "N° de Sécurité Sociale", "Date entée", "Date sortie", "Adhérent"],
colModel: [
{
name: "matricule", template: 'string', align:'center'
},
{
name: "idEmpl", template: 'string', align:'center'
},
{
name: "name", template: 'string', align:'center',
jsonmap: function (item) {
return item.name.first + " " + item.name.last;
},
sorttype: function (cell) {
return cell.last + " " + cell.first;
}
},
{
name: "numSecu", template: 'string', align:'center'
},
{
name: "dateEntree", formater: 'date', sorttype: "date", formatoptions:{newformat: 'dd-mm-yy'}, align:'center'
},
{
name: "dateSortie", formater: 'date', sorttype: "date", formatoptions:{newformat: 'dd-mm-yy'}, align:'center'
},
{
name: "adherent", template: 'string', align:'center'
}
],
onSelectRow: function(rowid){
//blabla
},
autowidth: true,
sortname: "name",
shrinkToFit: false
});
This problem happen only when i use the .show() and .hide() event of jQuery.