This question is locked. New answers and comments are not allowed.
I have a column named Description which can have either an empty string or a long description.
I want to trim the string if it is longer than 10 words or specific number of characters.
I tried doing this but nothing works. Please help me.. Thank you.
and also,
I want to trim the string if it is longer than 10 words or specific number of characters.
I tried doing this but nothing works. Please help me.. Thank you.
columns.Bound(o => o.Description)
.Template(o =>
{
if (o.Description.Length >= 100)
{ o.Description.Trim(); }
});
and also,
.CellAction(cell =>
{
if (cell.Column.Title == "Description")
{
cell.Text = cell.Text.Remove(100) +
".....";
}
})