Вопрос

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