jquery easyui DataGrid no scrollbar, DataGrid no vertical scroll bar
==============================
Sweet Potato Yiu February 6, 2018
http://www.cnblogs.com/fanshuyao/
First, the problem description:
When the size of the data in the DataGrid Easyui is large, the body page is also set to a height beyond the hidden (such as: Overflow-y:hidden), when the DataGrid loads the entire page without a scroll bar.
Second, the solution:
Bind the Onloadsuccess event to the DataGrid, and call the DataGrid's Resize method when the load succeeds, using the following:
JS Code
- $ ("#datagridId"). DataGrid ({
- ......
- ......,
- Onloadsuccess: function (data) {
- $ ("#datagridId"). DataGrid ("Resize", {
- Height: ($ (window). Height ())
- });
- }
- });
What if you want to add a horizontal scroll bar?
Java code
- $ ("#datagridId"). DataGrid ({
- ......
- ......,
- Onloadsuccess:function (data) {
- $ ("#datagridId"). DataGrid ("Resize", {
- Height: ($ (window). Height ()),
- Width: ($ (window). Width ())//estimate is this, no test
- });
- }
- });
==============================
Sweet Potato Yiu February 6, 2018
http://www.cnblogs.com/fanshuyao/
jquery easyui DataGrid no scrollbar, DataGrid no vertical scroll bar