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
1878
Disable Bands
posted

Hi,

maybe this is an easy task but I couldn't solve it. til now

I've an object that is bound to a WinGrid using a BindingSource. This object has some properties like strings etc. and a property with a list (System.Collections.Generic.List<T>) containing objects of another class. This list is shown in the VS Designer as an extra band.

Since I'm only interested in showing some of the properties of the 'main' band and not the additional band I set this to hidden which works pretty fine but the property still gets accessed although it's data is not presented. The problem is that this property uses lazy initialization, fetching the data from the database which is unnecessary because it's not getting displayed at all.

My question is can I disable an entire band or is there another possibility to overcome accessing the property?

Thanks in advance,
  Wolfgang

Parents Reply Children