This question is locked. New answers and comments are not allowed.
Hi, i have problem with binding data which involves conditional statements in client template.
I have done this to column template, which will only trigger when server bind, but i do not have any idea how to do the same thing in client template so that when there is Ajax binding, it will also bind the same statement.
.Columns(columns =>
{
columns.Bound(o => o.id).Template(
o =>
{
if (o.status == "C" || o.status == "P")
{
if (HttpContext.Current.User.IsInRole(Admin)
{
String.Format("<a href=\"{0}\">{1}</a>", URL + "/blog/" + o.id, "Preview");
}
}
}
*edited, sorry, even Server binding with the above code, also don't work.. anyone can assist me for this?
I have done this to column template, which will only trigger when server bind, but i do not have any idea how to do the same thing in client template so that when there is Ajax binding, it will also bind the same statement.
.Columns(columns =>
{
columns.Bound(o => o.id).Template(
o =>
{
if (o.status == "C" || o.status == "P")
{
if (HttpContext.Current.User.IsInRole(Admin)
{
String.Format("<a href=\"{0}\">{1}</a>", URL + "/blog/" + o.id, "Preview");
}
}
}
*edited, sorry, even Server binding with the above code, also don't work.. anyone can assist me for this?