StrataFrame Forum

Readonly BO

http://forum.strataframe.net/Topic14829.aspx

By Alex Bibiano González - 3/12/2008

Is there a property or some way to make a BO readonly.

I have a CategoryBO and a CategoryListBO. The CategoryListBO has only a subset of the fields from the CategoryBO, and I use it to populate some TreeLists and other controls (I don't  use it to update the DB).

Now I want configure the BO to be readonly. Is it possible?

Thanks,

Alex B.

By Peter Jones - 3/12/2008

Hi,

We generally acomplish that in (DevEx) grids by setting them to "not editable". Also, each BO has a BeforeSave event with e.Cancel property which you can use to discard the save - this may be better then you can turn ReadOnly on / off programatically.

Cheers, Peter

By Trent L. Taylor - 3/12/2008

Peters post is good information.  The BO has logic to add security to prevent adds, edits, and deletes based on permissions...however, in this case you are just wanting to use the BO to display information.  So what ever controls to which you are binding can just be set to read-only to prevent user interaction.  If you REALLY want to, you can change the properties to ReadOnly, but this would be overkill since you are in control of the UI.