Jump to content
Xtreme .Net Talk

Preventing Databound properties in a CollectionBase / IList / IBindingList


Recommended Posts

Posted

Hi All,

 

I have a simple class (lets say it's called Customer) which has an associated collection case (called CustomerCollection) that inherits from CollectionBase.

 

The problem I have is that I am binding the collection class to a 3rd party grid control (Infragistics), but don't require all of the columns that are being bound to be displayed on the grid. The Customer class consists of a large number of properties that are necessary for other use within my app, but not necessary for grid display purposes.

 

Yes - I know, I could just as easily override the layout initialization to stop the unwanted columns from being displayed. But what I'm ultimately after is a method of preventing these properties from being bound in the first place !

 

Does anyone know if there is an attribute that can be applied to a property that will stop it from being available when the class is databound ?

 

Cheers,

 

Mike.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...