Grid Property complicated


#1

Hi,

I have a suite 6.44 Grid.
I triying implement some properties but I can’t:
For example, sortable: false in the grid porperties but doesn’t works, neither in the colmuns definition.
The property height: ‘100%’, neither works. It paint fine the header but not the rows.
Columns width, I can’t get the table to fit 100% of the width.
Te property ajust: ‘data’ neither works

This is my code at the moment:

grid = new dhx.Grid('gridbox', { columns: columns, headerRowHeight: 20, rowHeight: 20, sortable: false, //doesn't works, sort icons shows, neither is I put in the column setup width: '100%', //doesn't works fine, make extrager things with the header height: '100%, //doesn't works fine, paint header but no the rows data: dataSet.map(e => { var o = { fecha: e.fecha }; e.sensores.forEach(el => { o['medida_' + el['idSensor']] = el.medida; o['alerta_' + el['idSensor']] = el.alerta; }); return o; }), });

Thanks


#2

align: “center” doesn’t works


#3

Please, refer to the following snippet:
https://snippet.dhtmlx.com/8c84k1ms

For example, sortable: false in the grid porperties but doesn’t works, neither in the colmuns definition.

In your provided code sorting blocks successfully

The property height: ‘100%’ , neither works. It paint fine the header but not the rows.

Please, note, that the parameter takes the number as a value:
https://docs.dhtmlx.com/suite/grid__configuration.html

Columns width, I can’t get the table to fit 100% of the width.
Te property ajust: ‘data’ neither works

Could you please provide your columns config

align: “center” doesn’t works

Currently there is no API allowing to change the align of data in the dhtx.Grid, but we’re planniung to add it in the futurte updates.
For now you may try to use the mark function for the column to apply the needed style (text-align in this case):
https://snippet.dhtmlx.com/eh32vqfi (check the first column of the grid)


#4

Since the dhtmlxGrid 6.5.1release you are able to define the align property for the columns:
https://docs.dhtmlx.com/suite/grid__configuration.html#alignment


#5

It’s is resolved by css, I can’t update (boss) de library versión.

Thanks a lot.