Reder Grid values with icons.

Nov 25, 2013 at 7:12 PM
columns.Add(u => u.IsLockedOut)
                   .Titled("Locked")
                   .RenderValueAs(u=> @Html.Raw( u.IsLockedOut 
                       ? "<i class=\"fa fa-lock\"></i>" 
                       : "<i class=\"fa fa-unlock\"></i>")).ToString();
renders the grid with the text. how can i get that to
columns.Add(u => u.IsLockedOut)
                   .Titled("Locked")
                   .RenderValueAs(u=> u.IsLockedOut 
                       ? "<i class=\"fa fa-lock\"></i>" 
                       : "<i class=\"fa fa-unlock\"></i>").Encoded(false);
renders the grid with no data.
Coordinator
Nov 26, 2013 at 5:38 AM
Hi try to set Sanitized to false:
columns.Add(u => u.IsLockedOut)
                   .Titled("Locked")
                   .Encoded(false)
                   .Sanitized(false)
                   .RenderValueAs(u=> u.IsLockedOut 
                       ? "<i class=\"fa fa-lock\"></i>" 
                       : "<i class=\"fa fa-unlock\"></i>");
Marked as answer by bhushanvinay on 11/26/2013 at 2:29 AM