Page 1 of 1

"Max Length (List page)" setting not working

Posted: Fri Jan 26, 2018 2:59 am
by mpopkin

Max Length (List page) setting is not working on where I am trying to use them in my project.

I'm using VARCHAR(MAX) data type, and setting the "Max Length (List page)" = 30, but the text is not truncating at all, and is just showing the complete string on the list page.

Is there anything else I need to set to make this work? Is it a problem with the data type? Or application/server versions?

Thanks!

ASP.NET Maker v2017.0.5
SQL Server 2012 - build 11.0.5613.0


Re: "Max Length (List page)" setting not working

Posted: Fri Jan 26, 2018 9:48 am
by Webmaster

The truncation occurs at the word boundary. Make sure that the value has spaces or line feeds in between.

Alternatively just use the Row_Rendered server event to truncate manually. For example:

if (!string.IsNullOrEmpty(<Field>.ViewValue))
<Field>.ViewValue = Convert.ToString(<Field>.ViewValue).Substring(0, <TruncateLength>);