Windows Develop Bookmark and Share   
 index > Windows Forms Data Controls and Databinding > Browsable Attribute and Databinding
 

Browsable Attribute and Databinding

I have been browing through page after page, looking for an explaination as to why Browsable(false) would have anything to do with databinding, and I'm getting a little frustrated. There are many places where people are suggesting people use this attribute in this fashion, but absolutely nothing to back them up other than it's proven to work that way,regardless of whether it is a bug.

Apparently, a databound control cannot use a property with this attribute (actually, this behavior is not consistent for all winform controls) . According to all the MS documentation I can find, the Browsable attribute is ONLY for setting design time properties.

Using Browsable to control databinding makes absolutely no sense to me. What if I'm sharing the object with someone else and we want to dispaly different properties of the same object? Why was an entirely new attribute not created for databinding, instead of hijacking an attribute that has other functionality?

Serinity Now  Wednesday, March 18, 2009 6:58 PM
Must agree with that. I've just discovered that my business entities cannot hide certain properties with [Browsable(false)] without breaking any DataBinding made to it.

My question is : "how to allow (advanced) databinding on a property but prevent it from default binding, such as DataGriwView generated column" ?
Thomas Bol.  Tuesday, September 29, 2009 2:00 PM

You can use google to search for other answers

Custom Search

More Threads

• ComboBox Bug? or my ERROR?
• Setting the currentcell to the cell with an error
• Master / Detail Combo boxes
• 2-state DataGridBoolColumn style
• Scroll-synchronizing two or more DataGridViews
• Problem With retrieving data from SQL Express
• Flipping Grid View's Row & Columns
• BindingSource.Current
• Controling forms datasorse through vb
• Problem detecting changes on a parent-child bindingsource