Why is this? It would be nice to be able to bind the Save button to the IsSavable property.
I searched for "bindable" in the ebook version of the VB book and the only hint I found is that one ObjectFieldInfo object is created for each bindable property on a business object (p. 320).
The use of Browsable(false) is discussed in Expert VB/C# 2005 Business Objects. The reason for using the attribute is to prevent the Windows Forms designer from including these properties (IsNew, IsDirty, IsDeleted, IsValid, IsSavable) from showing up when you drag-and-drop an object onto a form to set up the form's data binding.
It is a convenience in most cases, because otherwise you have to go remove those 5 properties from every object before you can set up data binding (typically you don't want 5 checkbox controls on every form and in every grid).
Unfortunately, unbeknownst to me and to the PM who owned the Windows Forms data binding designer at the time, Browsable(false) not only hides the properties from VS, but it actually makes the properties not bindable... This has been discussed on this forum a couple times before, and it came as quite a surprise to both me and the PM.
However, in Windows Forms there's a very reasonable workaround as described here. So my feeling is that it is better to leave the Browsable(false) attribute in place and use the workaround, than to remove the attribute and have to manually remove those 5 properties every time you want to create a form or grid.
In Web Forms this is a non-issue, because people don't typically bind to these properties. And in fact, removing Browsable(false) would mean that web developers would also have to remove the 5 properties manually each time they set up a GridView or DetailsView control. So again having the attribute is a net gain imo.
In WPF I have created an objectstatuspanel control that makes these 5 properties available for binding to controls. I think this is the best of both worlds, because you can use data binding against your business properties as normal, and if you want access to the 5 status properties you can easily get at them.
Copyright (c) Marimer LLC