How to call a Data from the Database from an FK in a DataTable?

0

Hello

I'm having a problem with an MVC project. I have a DataTable that needs to show a particular data from a Database table, but it needs to be shown from an FK that is referenced in the respective View JS Model.

I have the DepartmentSection table and there is the ProcessId field which is an FK of the Process table. However, the data I need to display in the DataTable is the Name field in the Process table. How do I display the DataTable?

Just as a way to demonstrate what I'm doing, I'm creating the DataTable columns in JS as follows:

var colsDepSec = [
{ data: 'DepartmentId', orderable: true, className: 'col-sm-2 text-center', title: 'Department' },
{ data: 'SectionId', orderable: true, className: 'col-sm-2 text-center', title: 'Section' },
{ data: 'SectionDescription', orderable: true, className: 'col-sm-2 text-center', title: 'Section Description' },   
];
    
asked by anonymous 12.07.2018 / 18:38

0 answers