BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
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>
Hi Alex
Query 1 : “Grid Column does not show any data”
Based on your query, Grid Column does not show any data in complex data binding. we have already discussed about this similar topics detailly in our UG documentation. Kindly refer the documentation link shared.
Reference : https://blazor.syncfusion.com/documentation/datagrid/columns#complex-data-binding
Please let us know if you have any concerns.
Regards,
Naveen Palanivel
Thank you very much, the line below solved the issue.
<GridColumn Field="coupon.Couponnumber" TextAlign="TextAlign.Center" HeaderText="Coupon" AutoFit="true"></GridColumn>
Welcome
We are glad to hear that your query has been resolved.
Please get back to us if you need further assistance.