EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Fabrice on September 09, 2015, 04:50:09 AM



Title: Propertgrid and multilines textarea
Post by: Fabrice on September 09, 2015, 04:50:09 AM
How can i display a multilines textarea on a propertygrid?
I want also that when editing the enter key don't leave the field but make a newline


Title: Re: Propertgrid and multilines textarea
Post by: jarry on September 09, 2015, 07:02:39 AM
Please set the 'textbox' editor with 'multiline' property set to true.
Code:
{"name":"Address","value":"","group":"ID Settings","editor":{
"type":"textbox",
"options":{
"multiline":true,
"height":50
}
}},


Title: Re: Propertgrid and multilines textarea
Post by: Fabrice on September 14, 2015, 01:39:36 AM
I would like a multilines textarea in the propertygrid, not only in the editor.
I have extended the textarea type to show multilines when editing and to catch <enter> key to go to the line when pressed. It's works fine but when i validate the field, the text entered appears in only one row in the property grid.



Title: Re: Propertgrid and multilines textarea
Post by: Fabrice on September 17, 2015, 12:39:56 AM
Any idea?


Title: Re: Propertgrid and multilines textarea
Post by: jarry on September 17, 2015, 01:37:19 AM
Please define a formatter function on the value column to display your value with multiple lines.


Title: Re: Propertgrid and multilines textarea
Post by: Fabrice on September 17, 2015, 06:36:47 AM
That's perfect.

As i want the same thing in a datagrid, i have added :
Code:
.datagrid-cell {
    height: auto;
}

in my css, is-it the best solution?