igGrid depending on value show value or image in grid
New DiscussionI'm using an igGrid table for displaying my data in ASP.NET MVC (with razor views). I have a column "Category". Depending on if the value (type string) is empty or not I want to show eighter the value or an icon. How can I do this?

Currently I'm filling my array for the datasource like this:
<text>
vendorDetails.push(
{
"Id": @detail.Id,
"Vendor": "@(detail.Vendor)",
"Category": "@(detail.CategoryName?.Substring(0, 6))",
"PurVal": "@Math.Round(detail.PurchasedValue, 0)",
"Tot": "@totalP",
"TotSc": "@Math.Round(detail.TotSc, 2)",
"MaxSc": "@Math.Round(detail.MaxTotSc, 2)",
"ToScDel": "@Math.Round(detail.ToScDel, 2)",
"MaxScDel": "@detail.MaxScDel",
"TotScQua": "@Math.Round(detail.TotScQua, 2)",
"MaxScQua": "@detail.MaxScQua",
"TotScPurch": "@Math.Round(detail.TotScPurch, 2)",
"MaxScPurch": "@detail.MaxScPurch",
"AvgScoreDATE": "@Math.Round(detail.AvgScoreDATE, 2)",
"AvgScoreQTY": "@Math.Round(detail.AvgScoreQTY, 2)",
"PPM": "@Math.Round(detail.PPM, 0)",
"ReactivityScore": "@detail.Reactivity_Score",
"QltyTblCertificatesScore": "@detail.Qlty_TblCertificates_Score",
"InternalStopScore": "@detail.InternalStopScore",
"CustomerStopScore": "@detail.CustomerStopScore",
"SqAgreementScore": "@detail.SqAgreementScore",
"PriceScore": "@detail.PriceScore",
"QltyTblSupplierPaymenttermsScoreScore": "@detail.Qlty_TblSupplierPaymenttermsScore_Score",
"BackgroundColor": "@backgroundColor"
}
);
</text>