DataGrid / Columns / Foreign Key Column

Blazor DataGrid Example - Foreign Key Columns

Loading Syncfusion Blazor Server Demos…

Local Data
0 of 0 pages (0 items)
Remote Data
0 of 0 pages (0 items)

This sample demonstrates how to use the foreign key column feature in the DataGrid component with full support for sorting, filtering, and editing.

Foreign key columns display related data from a separate datasource, enabling you to present meaningful information instead of raw ID values. Enable foreign key columns using the GridForeignColumn directive with the following properties:

The ForeignKeyValue property sorts foreign key columns using the display field instead of the ForeignKeyField.

For binding foreign key columns to remote data collections, use the SfDataManager component with a URL action instead of static collections. Define the ForeignKeyField and ForeignKeyValue properties in the GridForeignColumn directive.

For more information about foreign key columns, refer to the foreign key column documentation.

Transform your Blazor web apps today with Syncfusion® Blazor components
145+ high-performance and responsive UI components
Dedicated support
Hassle-free licensing
TRY IT FOR FREE