EasyUI Forum
April 29, 2024, 11:30:31 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Minimum Row Height for Datagrid  (Read 15213 times)
pmjenn
Newbie
*
Posts: 9


View Profile
« on: August 20, 2014, 07:04:14 AM »

Datagrid (and Treegrid) work better on a mobile device when the row height is big enough to give a good landing zone for touch. Is there are way to set a minimum row height for rows in a datagrid?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 20, 2014, 07:58:48 AM »

Please try to set the following CSS style.
Code:
<style>
.datagrid-header-row, .datagrid-row{
height:30px;
}
</style>
Logged
pratikk
Newbie
*
Posts: 49


View Profile Email
« Reply #2 on: January 05, 2016, 10:53:24 AM »

How can we do this with code

I tried ;

$('.datagrid-row').css({'height', '50px'});

But It didn't work.

I am writing  a touch screen app. so This will be very useful. 
Another thing is  combogrid is getting the new height but combo box don't .
« Last Edit: January 05, 2016, 11:19:42 AM by pratikk » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: January 05, 2016, 08:39:43 PM »

Please try this code instead.
Code:
$('#dg').datagrid({
    onLoadSuccess: function(){
        $(this).datagrid('getPanel').find('.datagrid-row').css('height', '50px')
    }
});
Logged
pratikk
Newbie
*
Posts: 49


View Profile Email
« Reply #4 on: January 07, 2016, 06:28:42 AM »

Thank You .  This is working nice with datagrid. I also want to adjust the combogrid and combobox  .  I tried this for combogrid but didn't worked.

                $('#cg_').combogrid({
                    onLoadSuccess: function(){
                        $(this).combogrid('getPanel').find('.datagrid-row').css('height', '50px');
                    }
                });
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #5 on: January 07, 2016, 08:25:24 AM »

Please try this:
Code:
$('#cc').combogrid({
autoRowHeight: false,
onLoadSuccess: function(){
$(this).combogrid('grid').datagrid('getPanel').find('.datagrid-row').css('height','50px');
}
})

Why don't you use the '.datagrid-row' CSS style. It is more easier to change the datagrid row height.

Logged
pratikk
Newbie
*
Posts: 49


View Profile Email
« Reply #6 on: January 07, 2016, 10:47:27 AM »

I want to give the size parametric. So the users can change the height as up to their choice.

combogrid is working fine. Now on combobox

 $('#cb_onodetip').combobox(
                    {
                        autoRowHeight: false,
                        onLoadSuccess: function() {
                            $(this).combobox('grid').datagrid('getPanel').find('.datagrid-row').css('height', '50px');
                        }
                    });

I used the code above but it didn't work Sad
« Last Edit: January 07, 2016, 11:04:47 AM by pratikk » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #7 on: January 07, 2016, 07:05:37 PM »

Please try this code instead.
Code:
$('#cb_onodetip').combobox({
onLoadSuccess: function(){
$(this).combobox('panel').find('.combobox-item').css({
lineHeight: '50px'
})
}
});
Logged
pratikk
Newbie
*
Posts: 49


View Profile Email
« Reply #8 on: January 07, 2016, 11:50:15 PM »

Thanx. Now it is working
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!