Best way to set width of datagrid columns created from code?

The first thing to do is to replace one_column with row here:

image

The second is to increase that 50 to 250.

The third is to use components like labels in the template form, because they will be able to wrap when their text is too long, while the default behavior of the text in a datagrid column without components is to show a plain text.

In this little app you can see how to dynamically add components to a datagrid template.

3 Likes