Dynamic columns in the table grid rows

Hey everyone,
I’m working with very dynamic data, so I don’t know how many cells I will get for each row or how many head columns I’ll have. This is why I’m trying to work with the row’s column attribute.
The issue is that I don’t understand what type of data I need to bind to the columns attribute.
For example, this is the type of data needed for the Datagrid columns:
[
{
“headerName”: “Name”,
“cellDataType”: “text”,
“field”: “name”,
“width”: “200px”,
“sortable”: true
},
{
“headerName”: “Price”,
“cellDataType”: “number”,
“field”: “price”,
“width”: “100px”,
“sortable”: true
}]
I need the same just for the columns in the row elements of the regular table.

*If someone also knows how to work with the column position I would appreciate some explanation.

1 Like

Same question here — this item is missing an example of what the expected answer should be.

Hi @tomerer2000

The expected binding format for the columns property is [“1fr”, “1fr”].

1 Like