I am trying to load the grid state from the json that is saved when saving grid state. I am using `JSON.parse(text)` text being my json. The actual code works everywhere else but the unexpected token # in json is causing issues.
This is the specific area that is causing the issue
columns.Template(@<
text
>
</
text
>)
.Title("Actions")
.ClientTemplate(
"<
a
href
=
'" + @Url.Action("EditTime", "TimePunches", new { id = "#=ID#", flt = @ViewBag.FLT }) + "'
title
=
'Edit'
><
i
class
=
'icon-edit fa fa-pencil fa-fw fa-lg'
></
i
></
a
>" +
"<
a
href
=
'" + @Url.Action("PunchLogIndex", "TimePunches", new {id = "#=ID#", flt = @ViewBag.FLT}) +"'
title
=
'Punch Log'
><
i
class
=
'icon-purple fa fa-book fa-fw fa-lg'
></
i
></
a
>" +
"<
a
href
=
'" + @Url.Action("PunchRequestIndex", "TimePunches", new { punchId = "#=ID#", flt = ViewBag.FLT }) + "'
title
=
'See Change Request Log'
><
i
class
=
'icon-niagara fa fa-list fa-fw fa-lg'
></
i
></
a
>" +
"<
a
href
=
'\\#'
id
=
'delete'
data-id
=
'#=ID#'
data-client
=
'#=ClientID#'
><
i
class
=
'icon-red fa fa-times fa-fw fa-lg'
></
i
></
a
>").Width(150).HeaderHtmlAttributes(new { @class = "header-center" });
It's my understanding that the razor text attributes are not liked when loading grid state. Is there a way to load this template in after the fact?