row-numberjquery-easyui

increase height of rownumber easy-ui


I'm using easy-ui as it is documented in it's guide like this:

 <table title="Folder Browser" class="easyui-treegrid" style="width:700px;height:250px"
            data-options="
                url: 'treegrid_data1.json',
                method: 'get',
                rownumbers: true,
                idField: 'id',
                treeField: 'name'
            ">

One of the fields of table is a thumbnail of image which style is <img style="display:block;" width="100%" height="100%" src =... and becuase of this field height each row will have a bigger height. but rownumbers' height still will be of old small height. how can i solve this problem? I tried adding some style to rownumber like this to increase size of rownumbers but it doesn't work showing a message in javascript "Selector .datagrid-cell-rownumber is never used":

<style>
        .datagrid-header-rownumber{
            width:30px;
        }
        .datagrid-cell-rownumber{
            width:30px;
        }
    </style>

Solution

  • You can use the datagrid method 'fixRowHeight': $('#dg').datagrid('fixRowHeight'); or 'resize' may also helpfull: $('#dg').datagrid('resize');

    more information can be found at: http://www.jeasyui.com/documentation/datagrid.php