简体   繁体   中英

JQGrid mapping issue: Populating JQGrid with data from two related tables

I'm currently working with two tables that I'm accessing through NHibernate entity framework: - Invoices - InvoiceItems

I need to create an Invoice Items report and include the Invoice table infomration on it as well.

The two tables are connected by InvoiceId. To populate my report data I created a model for the JQGrid that's connected to the "InvoiceItems" data model ( that's where I get the data from ).

My problem is that I can't seem to figuire out how to populate the "InvoiceItems" report with the "Invoice" table field values. Errors such as [Property 'InvoiceDate' not found on Namespace.InvoiceItems] or just [NaN NaN] keep showing up in columns where the information from the parent [Invoices] table should be. I tried using 'InvoiceItems.Invoices.InvoiceDate' syntax for example to map the grid colNames to data names but it doesn't work.

So how can I map the "Invoices" table fields to the grid model that returns fields from both "Invoices" and "InviceItems" data models ?

Thank you in advance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM