"Max Length (List page)" setting not working

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
mpopkin
User
Posts: 9

"Max Length (List page)" setting not working

Post 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


Webmaster
User
Posts: 9425

Post 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>);


Post Reply