Unexpected behavior


Author
Message
Sam Tenney
Sam Tenney
StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)StrataFrame Novice (102 reputation)
Group: StrataFrame Users
Posts: 70, Visits: 3.5K
I am seeing some unexpected and inconsistent behavior that I will try to explain.  First let me explain what I think should be happening and then I will explain what is happening.  Hopefully someone will agree with me and we can get a very minor improvement made in the StrataFrame Application Framework.

On a simple maintenance form with controls bound to a simple properly configured business object, if there are no visible records in the local data table (business object), I would expect all the bound controls to be automatically disabled when the business object is in the idle state because there is no data to bind the controls to.  That is exactly how the StrataFrame framework behaves when using the default mode which requires clicking the Edit button on the toolstrip to enable editing.

However on the same maintenance form and using the same business object if I change just 3 properties to enable automatic editing so that the user does not need to click the Edit button to begin editing, the behavior is unexpected and inconsistent with the default mode described first.  In my opinion if there are no visible records in the local data table (business object), all the bound controls should automatically be disabled because there is no data to bind the controls to.  The behavior should be the same whether using the default mode requiring clicking the Edit button to edit records or using the automatic editing mode.  No records means no data to bind the controls to, so the controls should be disabled until a new record is added etc.

The only properties that need changing to switch from default editing mode to automatic editing mode are setting the toolstrip property named AutoManageIsDirtyChangedEvent to True and the business object property named ManageUIReadOnlyState to False.  And then I always remove the Edit button from the toolstrip when choosing to use automatic edit mode.

The undesired symptom when using the automatic edit mode is that controls are enabled even though they are not bound to any actual data because there are no visible records.  Entering data into those incorrectly enabled controls does not actually change any records but it is very confusing to the end user to be able to enter data but not be able to save it.

A simple "OrElse (Not DataPresent)" added at the end of the If statement at line 3404 in the businesslayer.vb file would probably solve the problem.  I don't think I can override that method, so I do not know of any way I can solve the problem myself.  This is really just a simple question of whether or not controls should be enabled when they have no data to bind them to.

Sam Tenney
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search