$('#dg').datagrid({ width: '100%', height: '100%'});
$( window ).resize(function() { $('#dg').datagrid('resize');});