How to set cell/row height with wijmo grid with a dynamic id?

193 Views Asked by At

Im currently trying to have the row height of a wijmo grid extended, but to no avail. I read the official documents and they said to add padding to the css of the grid cells, but in my case, the id is dynamic (meaning it is generated and not fixed). So I do not know how to change the row Height.

I have tried to set the padding from code, but the library made a alt grid just to stop me from changing the row height.

$('#' + 'form-' + currentFormIndex.toString() + '__' + element.Name).find('.wj-cells > .wj-row > .wj-cell').css("padding", "32px");

I want to ask if it is possible to change the row height in js code, OR if it is possible to add the dynamic id inside css files.

1

There are 1 best solutions below

0
On

In Vue.js I have this on a wijmo grid table:

onloadedRows(grid) {
  grid.rows.forEach(row => {
    const dt = row.dataItem;
    row.cssClass = dt.style
    // In row.heigth you can assign a value from your object row.
  })
},

This code is called on DOM object:

<wj-flex-grid 
....
:loaded-rows="onloadedRows"
...
</wj-flex_grid>

I don't tried this, but it seems that it can be a good option.