Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
280
newlines ignored in multiline text cell in grid's display mode
posted

I have a simple grid with one text column in multiline mode. When I go into edit mode I can enter newlines by using Alt-Enter. But when I leave the edit mode my input shows in one line. How can I have my input also in multiple lines?

Here is my code:

var model = getGridModel(parentID, strTypeItem); 
model.AutoCommit = false; 
model.Columns.Add(new GridColumn { Key = "Value", DataType = "string", HeaderText = "Comment", Width = "50%" }); 
model.Columns.Add(new GridColumn { Key = "User", DataType = "string", Width = "25%" }); 
model.Columns.Add(new GridColumn { Key = "DateCreate", DataType = "date", Format = "yyyy-MM-dd", HeaderText = "Date", Width = "25%" }); 

var updating = new GridUpdating(); updating.EnableAddRow = true; updating.EnableDeleteRow = true; updating.EditMode = GridEditMode.Row; updating.ColumnSettings.Add( new ColumnUpdatingSetting { ColumnKey = "DateCreate", EditorType = ColumnEditorType.DatePicker, ReadOnly = true }); updating.ColumnSettings.Add( new ColumnUpdatingSetting { ColumnKey = "User", DefaultValue = user.Identity.GetUserName(), ReadOnly = true });
var cus = new ColumnUpdatingSetting { ColumnKey = "Value", Required = true }; cus.TextEditorOptions.TextMode = TextEditorTextMode.Multiline; cus.TextEditorOptions.Height = "200px"; cus.TextEditorOptions.PreventSubmitOnEnter = true; updating.ColumnSettings.Add(cus);
model.Features.Add(updating);
Parents Reply Children