We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Datasource sublists

Thread ID:

Created:

Updated:

Platform:

Replies:

88518 Jul 28,2009 08:45 AM Jul 29,2009 02:14 PM ASP.NET MVC (Classic) 4
loading
Tags: Grid
Eric Swann
Asked On July 28, 2009 08:45 AM

Hello, I'm using an ORM (LightSpeed) for my datasource. The object I'm using as the basis of my datasource is a domain object with several subcollections which are automatically lazy loaded on demand by the ORM.

What I've found is that when the grid binds to my datasource, the grid interrogates all of these subcollections, even though none of them are set up as grid columns. This causes my entire object graph to load which is obviously very bad for performance reasons. Is there a way to turn this functionality off in the grid? Otherwise I'll have to create a special class just for binding to the grid, which I'd like to avoid.

Thanks!
Eric

Balaji K [Syncfusion]
Replied On July 29, 2009 06:01 AM

Hi Eric,

Thank you for using Syncfusion Products.

Please find the same query update in the following forum

http://www.syncfusion.com/support/forums/grid-mvc/87870/Display-columns-mapping

Regards,
Balaji.

Eric Swann
Replied On July 29, 2009 08:23 AM

Hello Balaji,

Unfortunately my question is completely different from the one answered in the other post.

What I am saying is that the grid automatically accesses all of my model properties....even the ones that are not mapped to columns when it databinds. This causes my entire object (including all subcollections) to lazy load from my database when the grid is bound.

I believe the grid is trying to help me by automatically detecting subcollections, but with any ORM based object out there this is going to absolutely kill site performance.

I want to ***prevent*** this from happening. Is there a way to disable this in the grid so that it doesn't automatically try to determine all of my subcollections?

Thanks!
Eric

Eric Swann
Replied On July 29, 2009 09:26 AM

Essentially what I did to accomodate this was to make a specific ViewModel without all of my collections to bind to the grid using Automapper:
http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/01/22/automapper-the-object-object-mapper.aspx

Balaji K [Syncfusion]
Replied On July 29, 2009 02:14 PM

Hi Eric,

We regret to let you know that we don't support lazy load option.

The mentioned way would be a work around for now and the request has been considered as a feature request and has been forwarded to our development team for further analysis.

You can expect this feature in the future release.

Regards,
Balaji.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;