So here's how I went about it (using Kendo UI Grid (MVC Template version)):
To shorten the length of an email address displayed in a row
so it will fit better I did the following (same method can be applied to
shorten a paragraph or other text):
I bind my column in my grid and applied a client template.
columns.Bound(c => c.Email).ClientTemplate(string.Format("{0}...",
"#= formatter(Email) #"));
I wrote a javascript function to handle the formatting:
<script type="text/javascript">
function
formatter(value) {
return value.substring(0, 10);
}
</script>
No comments:
Post a Comment