cancel
Showing results for 
Search instead for 
Did you mean: 

sap.m.table row height adjustment

senthil_kumar44
Participant
0 Kudos

Hi,

We have one issue in sap.m.table. In application, I am setting row height of table based on other calculated values. But row /cell height is automatically increased based on the contents inside. if I increase the size, it is increase but I reduce it, it is not reducing.

I tried thru CSS also. But it is not working.

How to reduce the height of row/cell? Also how to stop auto increase of height of cell?

Thanks,

Senthil

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hi Senthil,

List Item for table automatically adjusts the height depending on the control template used for cells aggregation. However, if you have a hard requirement to decrease the height, there is one option of removing padding that is used for the control templates.


Please check below -

Before padding remove, table item looks like this - http://embed.plnkr.co/OjoRwBMbkcXggRNnNSWS/preview

After padding remove, table item looks like this - http://embed.plnkr.co/1P2YC8BaONoBRQVqNXYB/preview


Regards,

Sai Vellanki.

Answers (2)

Answers (2)

former_member182862
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi Senthil,

No need to set height of row/cell u can suimply use HBox for each cell and fix the height of that one.then automaticaly row height will decrease.and u can also decrease the row height by removing the padding

of this class .sapMListTblCell

like

<cells>

  <HBox height="4rem">

  <Image xmlns="sap.m" src="{IconSRC}" press="onImagePress"

  class="treeColumn1">

  </Image>

  </HBox>

</cells>