DeviceType.Manufacturer.Name not showing in grid

<SfGrid DataSource="@records" AllowPaging="true" @ref="recordGrid">

    <GridPageSettings PageSize="10"></GridPageSettings>

    <GridColumns>

        <GridColumn Field="@nameof(Airmax.Decoder.Designer.Shared.DeviceType.DeviceName)" HeaderText="Name" TextAlign="TextAlign.Right" Width="120"></GridColumn>

        <GridColumn Field="@nameof(Airmax.Decoder.Designer.Shared.DeviceType.Description)" HeaderText="Description" Width="150"></GridColumn>

        <GridColumn Field="@nameof(Airmax.Decoder.Designer.Shared.DeviceType.Manufacturer.Name)" HeaderText="Manufacturer" Width="150"></GridColumn>

        <GridColumn Field="@nameof(Airmax.Decoder.Designer.Shared.DeviceType.UpdatedBy)" HeaderText="UpdatedBy" Width="150"></GridColumn>

        <GridColumn Field="@nameof(Airmax.Decoder.Designer.Shared.DeviceType.Version)" HeaderText="Version" Width="150"></GridColumn>

        <GridColumn Field="@nameof(Airmax.Decoder.Designer.Shared.DeviceType.CreatedDate)" HeaderText="CreatedDate" Width="150"></GridColumn>

        <GridColumn Width="150">

            <Template>

                @{

                    var c = (context as Airmax.Decoder.Designer.Shared.DeviceType);

                    <SfButton @ref="recordBtn" @onclick="@((args) => Show(args,c.Id))">Show</SfButton>

                }

            </Template>

        </GridColumn>


    </GridColumns>

</SfGrid>

<SfButton @onclick="@Create">Create New</SfButton>


@code {

    List<Airmax.Decoder.Designer.Shared.DeviceType> records = new List<Airmax.Decoder.Designer.Shared.DeviceType>();

    SfGrid<Airmax.Decoder.Designer.Shared.DeviceType> recordGrid;

    SfButton recordBtn;


    protected override async Task OnInitializedAsync()

    {

        records = await ServiceBase.Get();

    }


1 Reply

NP Naveen Palanivel Syncfusion Team June 29, 2022 05:36 PM UTC

Hi Tim,


Greetings from Syncfusion support.


We Checked your Query and We found that your using complex data binding but it is incorrectly defined. We have already discussed this topic in our UG documentation. Kindly refer the documentation link for more details


Reference : https://blazor.syncfusion.com/documentation/datagrid/columns#complex-data-binding


Please get back to us if you have further queries.


Regards,

Naveen Palanivel.


Loader.
Up arrow icon