I have a client-server app using Janus GridEx and Linq2Sql.

I have a grid that has one sub-table; Invoices (root) and Invoice Items (sub).

I would like to only retrieve invoice items when the invoice row is expanded..

Is this possible?

有帮助吗?

解决方案

I think Yes , I have done this with EntityFramework (WinForm) , it should works for LinqToSql

First you need to Add a property to your Invoice class, use "partial" to do this

partial class Invoice
{
    public List<InvoiceItem> InvoiceItemList { get { return this.InvoiceItems.ToList();} }

}

then add a Child table for this property to your gridex. if you have lazy loading and proxy 'ON' and did not dispose your context,you must have not any other problem

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top