Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
265
How to _completely_ ignore a column while binding to a WinGrid?
posted

Hello:

I am using an ORM/domain modeler (Mindscape LightSpeed, if that matters) and trying to bind a collection of entities to a WinGrid.  The target grid is a single column of this entity within the collection.  There are 4 rows and so 4 cells.

I am using Infragistics WinForms 13.1 with service packs installed through 4/8/2015. Visual Studio 2013 and .NET 4.0.

The ORM has rich relationships defined, so the entity I am binding has a property of a collection of OTHER entities.  This collection is many thousand rows but is lazy loaded only when accessed.  The trouble I am having is that the WinGrid accesses it. So my 4 row grid takes 20 seconds to display because it has to fetch all those thousands of rows when binding.  The grid WORKS fine but takes terrible long to display.

I hide all but the column I care about in InitializeLayout but that's too far downstream.

What I am looking to do is provide this 4 cell grid in a timely fashion which means I need to stop the WinGrid from touching the columns I don't care about.

I am binding using a BindingList and assigning it to the WinGrid.DataSource which I guess I'm not supposed to do in nearly every case so I followed this article:

http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=6702

The Band has the derived Key of "BindingList`1" and my columns are properly named but the article changed nothing in the behavior I'm trying to avoid.

I also changed NewColumnLoadStyle to FALSE which didn't help.

I also followed the suggestions put forth here:

http://stackoverflow.com/questions/1180004/binding-to-bindinglistt-choose-what-to-bind

Does anyone have any suggestions to teach a WinGrid to just IGNORE a column while binding? HIDING a column is nice but isn't enough.

Thanks in advance.

Robert