How to add an if condition to the RenderValueAs column?
I would like to check the status of different columns and add a button.
example: Need to add a button after Update Profile as Review Profile when the ProfileStatus == 'Submitted'
@await Html.Grid(Model).Columns(columns =>
{
columns.Add(x => x.FirstName);
columns.Add(x => x.LastName);
columns.Add(x => x.Email);
columns.Add(x => x.PhoneNumber);
columns.Add(x => x.isActive);
columns.Add(x => x.ProfileStatus);
columns.Add(o => o.Id).Encoded(false).Sanitized(false).Titled("Action")
.RenderValueAs(o => $" Edit " +
$" Update Profile +
$" ");
}).RenderAsync()
How to add an if condition to the RenderValueAs column?
I would like to check the status of different columns and add a button. example: Need to add a button after Update Profile as Review Profile when the ProfileStatus == 'Submitted' @await Html.Grid(Model).Columns(columns => { columns.Add(x => x.FirstName); columns.Add(x => x.LastName); columns.Add(x => x.Email); columns.Add(x => x.PhoneNumber); columns.Add(x => x.isActive); columns.Add(x => x.ProfileStatus); columns.Add(o => o.Id).Encoded(false).Sanitized(false).Titled("Action") .RenderValueAs(o => $" Edit " + $" Update Profile + $"");
}).RenderAsync()