EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: ehussain on September 26, 2014, 02:06:20 AM



Title: Responsive DataGrid
Post by: ehussain on September 26, 2014, 02:06:20 AM
How to make EasyUI datagrid responsive so that it is resized when the browser window's size changes?


Title: Re: Responsive DataGrid
Post by: stworthy on September 26, 2014, 07:32:40 AM
You can set the datagrid's size in percentage.
Code:
$('#dg').datagrid({
  width: '100%',
  height: '100%'
});


Title: Re: Responsive DataGrid
Post by: A-K on September 26, 2014, 11:37:51 AM
You could also use this with the datagrid's size in percentage:
Code:
$( window ).resize(function() {
      $('#dg').datagrid('resize');
});


Read more about the window object and his events it in the jQuery documentation.