jquery easyui datagrid no scroll bar, datagrid no vertical scroll bar
========================
Sweet Potato YaoFebruary 6, 2018
http://fanshuyao.iteye.com/
1. Problem description:
When the amount of data in the jquery easyui datagrid is large, and the height of the body page is set to exceed the hidden height (such as overflow-y:hidden), there is no scroll bar when the datagrid loads the entire page.
Second, the solution:
Bind the onLoadSuccess event to the datagrid, and call the resize method of the datagrid when the loading is successful. The specific usage is as follows:
$("#datagridId").datagrid({ …… ……, onLoadSuccess: function(data){ $("#datagridId").datagrid("resize",{ height: ($(window).height()) }); } });
What if you want to add a horizontal scroll bar?
$("#datagridId").datagrid({ …… ……, onLoadSuccess: function(data){ $("#datagridId").datagrid("resize",{ height: ($(window).height()), Width: ($(window).width())//It is estimated that this is the case, no test }); } });
========================
Sweet Potato YaoFebruary 6, 2018
http://fanshuyao.iteye.com/