EasyUI Forum
April 28, 2024, 10:17:42 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: set parent datagrid row height, but let unchanged row height on subgrid  (Read 5661 times)
Juan Antonio Martínez
Jr. Member
**
Posts: 68



View Profile
« on: May 26, 2016, 09:48:49 AM »

I have a detailview datagrid with subgrids, and want to change parent row height (to emphasize these rows) , but let unchanged subgrids row height

What's the right way to to?

(Using easyui-1.4.2)

Thanks in advance
Juan Antonio
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 26, 2016, 05:50:02 PM »

You can override the '.datagrid-row' CSS style to change the row height. Please try this code:
Code:
<style type="text/css">
    .datagrid-row{
        height:30px;
    }
    .datagrid-row-detail .datagrid-row{
        height:25px;
    }
</style>
Logged
Juan Antonio Martínez
Jr. Member
**
Posts: 68



View Profile
« Reply #2 on: May 27, 2016, 02:29:57 AM »

Fine, but this affect every datagrid in page (including combos, and so...). And the inner datagrid-cell height is not affected, just the entire row. I want to reserve enought space to add some icons in parent row, so need increase also datgrid-cell height

My final solution was:
Code:
        <div id="pb_tabla" data-options="region:'center'">
                <table id="pb_finales-datagrid"></table>
        </div>

Code:
    
<style>
    #pb_tabla .datagrid-row {
        height:40px;
        line-height: 40px;
    }
    #pb_tabla .datagrid-row .datagrid-cell {
        height:35px;
    }
    #pb_tabla .datagrid-row-detail .datagrid-row {
        height:25px;
        line-height: 25px;
    }
</style>

Code:
<script type="text/javascript">
....
$('#pb_finales-datagrid').datagrid({....});
</script>

Thanks for your help. Cheers
« Last Edit: May 27, 2016, 09:40:24 AM by Juan Antonio Martínez » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!