I have this code:
And when the page is loaded the Get Request is fired but, the data is not shown in the Grid.
Please help me I don't understand why the data does not show in the SfGrid??
<SfGrid TValue="UnitMappingDtoForViewing" AllowResizing="true" EnableHover="true" AllowPaging="true" AllowSorting="true" Toolbar="@(new List<string>() { "Add", "Edit", "Delete", "Cancel", "Update" })">
<SfDataManager Url="@UnitMappingUrl" Adaptor="Adaptors.JsonAdaptor"></SfDataManager>
<GridEditSettings AllowAdding="true" AllowDeleting="true" AllowEditing="true" Mode="EditMode.Normal"></GridEditSettings>
<GridPageSettings PageSize="10"></GridPageSettings>
<GridColumns>
<GridColumn Field="Id" HeaderText="ID" IsPrimaryKey="true" IsIdentity="true" AutoFit="true"></GridColumn>
<GridColumn Field="PLMUnit" HeaderText="PLM/PDM Unit" AutoFit="true"></GridColumn>
<GridColumn Field="IsahUnit" HeaderText="Isah Unit" AutoFit="true"></GridColumn>
@*@foreach (var prop in typeof(UnitMappingDtoForViewing).GetProperties())
{
<GridColumn Field="@prop.Name" AutoFit="true"></GridColumn>
}*@
</GridColumns>
</SfGrid>
code behind:
namespace EngineeringAPIWebsite.Pages
{
public class UnitMappingListBase :ComponentBase
{
public class UnitMappingDtoForViewing
{
public Int32 Id { get; set; }
public string PLMUnit { get; set; }
public string IsahUnit { get; set; }
}
public string UnitMappingUrl = "http://localhost:6789/api/EngineeringUnitMapping/";
}
}