Foreign Key Column in ASP.NET MVC Tree Grid Component

18 Nov 20181 minute to read

Since Tree Grid Databinding concept is based on hierarchy relationship, there is no in-built support for foreign key datasource. However, it is possible to display foreign key values in the Tree Grid at initial rendering as well as while Editing.

To display the foreignKey value at initial rendering, useQueryCellInfo event of the Tree Grid and and also for edit action use EditType and Column.edit properties of Tree Grid Column to render Dropdownlist with foreign datasource.

In the following code example, EmployeeID is a foreign column which shows EmployeeName from foreign data.

NOTE

You can refer to our ASP.NET MVC Tree Grid feature tour page for its groundbreaking feature representations. You can also explore our ASP.NET MVC Tree Grid example to knows how to present and manipulate data.