formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

How define size for columns in datagrid?

Open bigjorjao opened this issue 5 years ago • 4 comments

I have a datagrid for example with three fields(columns). I wanted to define the size of each one. For example, the first occupy 10%, the second 60 and the third 30%. How can I do this?

bigjorjao avatar Feb 24 '20 11:02 bigjorjao

The datagrid uses a table component and there currently aren't any options in the UI for defining width. You can override this in the template to add your own classes or styles directly. https://github.com/formio/formio.js/blob/master/src/templates/bootstrap/datagrid/form.ejs#L32-L36

If all you want to do is define some hard coded widths, you can do that directly by writing some CSS to set the width of the columns for that component.

randallknutson avatar Feb 24 '20 14:02 randallknutson

+1

qomhmd avatar Nov 20 '20 05:11 qomhmd

+1

emmanuel2804 avatar Feb 04 '21 14:02 emmanuel2804

+1

cezavaletal avatar Sep 01 '22 16:09 cezavaletal

+1

prashantsail avatar Nov 25 '22 12:11 prashantsail

We're currently addressing a backlog of GitHub issues, and as part of this effort. Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!

VikkiAlenn avatar Jan 31 '24 14:01 VikkiAlenn