I have a simple class, which includes another class
public class QuoteRequest {
public int QuoteRequestId { get; set; }
public DateTime DateTimeReceived { get; set; }
public string PlatformUsed { get; set; }
public Coupon coupon { get; set; }
public int? CouponId { get; set; }
}
The coupon class is :
public class Coupon
{
public int CouponId { get; set; }
public string Couponnumber {get; set; }
}
My blazor page code has this code, which populates list just fine, all the data is present
protected override async Task OnInitializedAsync()
{
QuoteRecordList = (await QuoteDataServices.GetQuoteData(null, null)).ToList();
}
The grid shows all the columns, but failing on this one. It's blank. However data is present in the list.
<GridColumn Field=@nameof(QuoteRequest.coupon.Couponnumber) TextAlign="TextAlign.Center" HeaderText="Coupon" AutoFit="true"></GridColumn>