Hey, I'm trying out Flexigrid (http://code.google.com/p/flexigrid/) for a new app - I'm really impressed with it but I can't find a way to set the width in code.
The main reason for this is to get the GRID (not the columns inside the grid) to align fully to the size of the window. I know, it makes a mockery of the horizontal resizer, but that's what I have to do!
FYI my set up is the following:
$(document).ready(function() {
$("#flex1").flexigrid
(
{
url: '<%= ResolveUrl("~/Data.ashx") %>?filter=none',
dataType: 'json',
colModel: [
{ display: '', name: 'view', width: 20, sortable: true, align: 'center' },
{ display: 'Street', name: 'Street', width: 260, sortable: true, align: 'left' },
{ display: 'Town', name: 'Town', width: 200, sortable: true, align: 'left' },
{ display: '', name:'Actions', width:30, sortable: false, align: 'center' }
],
sortname: "Street",
sortorder: "asc",
usepager: true,
title: 'Streets',
useRp: true,
rp: 15,
showTableToggleBtn: false,
width: 800,
height: 200
}
);
});
but the following function doesn't work:
function ResizeGrid() { $('#flex1').flexOptions({ width:1000 }).flexReload(); }
It causes the grid to refresh, but nothing more.
Any ideas?
Thanks