This is a migrated thread and some comments may be shown as answers.

Grid Web UI

8 Answers 325 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rafael
Top achievements
Rank 1
Rafael asked on 24 Jan 2013, 11:11 AM
How to change row's height in Kendo WebUI ?

8 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 24 Jan 2013, 12:19 PM
Hi Rafael, 

You can achieve this using CSS. For example:

.k-grid tbody tr{
    height: //....;
}  

Another option is to using a rowTemplate / altRowTemplate. For example: 
<script id="template" type="text/x-kendo-template">
    <tr style="height: //...;">
         <td>//....</td>
         //....
    </tr>
</script>
 
<script>
$("#grid").kendoGrid({
   //....
   rowTemplate: kendo.template($("#template").html())
});
Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Rafael
Top achievements
Rank 1
answered on 24 Jan 2013, 12:33 PM
Iliana, thanks for prompt reply

Unfortunately I can not find .k-grid tbody tr neither in kendo.common.min.css nor in kendo.default.min.css
could you please to clarify what CSS you are referring to?

0
Iliana Dyankova
Telerik team
answered on 24 Jan 2013, 02:25 PM
Hi Rafael,

In order to get the desired outcome you should just add the suggested CSS to the page where your Grid is. For the ways of inserting a style sheet you could check this article.

Regards,
Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Binny
Top achievements
Rank 1
answered on 21 Jul 2014, 10:57 AM
tried it, Not working :(
0
Iliana Dyankova
Telerik team
answered on 22 Jul 2014, 11:53 AM
Hello Binny,

I tested both suggestions and they are working as expected:
- Change rows height via CSS - example;
- Change rows height using row template - example.
Could you please modify one of the examples and demonstrate your current implementation - this way I would be able to check what exactly is going wrong and provide concrete recommendations? Thank you in advance for your time and cooperation.

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ievgen
Top achievements
Rank 1
answered on 24 Jul 2015, 09:01 PM

Iliana,

Both CSS and Row Template examples do not work if I need row height less than 50px. I need to override cell padding, to make rows narrow, but then the grid does not fill all available space, half of it is empty:

http://dojo.telerik.com/AqEXO ​

0
Iliana Dyankova
Telerik team
answered on 28 Jul 2015, 08:48 AM
Hi ,

This outcome is due to height 800 which is set to the Grid - if you would like the grid to be as tall as the pageSize number of records please remove the defined height.

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Alex Fuernsinn
Top achievements
Rank 1
answered on 08 Sep 2016, 08:36 AM

Hi,

i also had this issue and wanted to change row's height for KendoGrid. 

The following solution worked for me:

.k-grid table {
   table-layout: fixed;
}
 
.k-grid td{
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height:1em !important;
}

Regards,
Alex Fürnsinn
EnergieAllianz Austria GmbH

Tags
Grid
Asked by
Rafael
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Rafael
Top achievements
Rank 1
Binny
Top achievements
Rank 1
Ievgen
Top achievements
Rank 1
Alex Fuernsinn
Top achievements
Rank 1
Share this question
or