DevExpress XtraGrid

DevExpress XtraGrid

Old forum URL: forums.lhotka.net/forums/t/4627.aspx


craigh posted on Monday, April 07, 2008

Is anyone using DevExpress controls in conjunction with CSLA.NET?

I'm interested to know in particular if anyone has had any success with their "server-mode" additions especially now that they have added LINQ support in the v2008 vol1 release.

This would really improve the performance of applications if the fetching of CSLA business objects could be achieved on demand in this way.

Does anyone have any thoughts on this?

maxal replied on Monday, April 14, 2008

I implemented Server Mode but it wasn't simple, took me few days.

The approach I took was.

1. Created interface ILazyLoading

2. Added support of this interface right into CSLA code, into ExtendedBindingList.

3. Created my own object (similar to BindingSource) that supports DevExpress IListServer using ILazyLoading.

I could add IListServer int CSLA, but didn't want to add reference to DevExpress into CSLA.

I could support ILazyLoading in my "base" object, but didn't want to duplicate code for BaseList and ReadOnlyList.

At this moment we use client/server access, so the place when I load more data is using this, avoiding using DataPortal proxy for better performance. But it can be easily changed by getting new list using DataPortal and then moving objects from it into main list.

The way it works I load primary keys for all records when list is created without creating objects and it works much (many times) faster. Then when objects are requested they are loaded in groups (currently 100 at once). Wanted to support background loading (separate thread) but couldn't do it fast (there were complications), so it is postponed.

All this for CSLA 3.0

Copyright (c) Marimer LLC