IBusinessBindable UserControl IgnoreManageUIReadOnly Property


Author
Message
Chris Diesel
Chris Diesel
StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)
Group: StrataFrame Users
Posts: 74, Visits: 300
I have a user control that implements IBusinessBindable and contains several lables and comboboxes.  The overall usercontrol is bound to a businessobject but the lables and comboboxes contained within are not.  How can I prevent the lables contained in the usercontrol from enabling/disabling based on the form's editing state?  It doesn't matter if I set the IgnoreManageReadOnly on the labels to true or not.

Thanks!
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You'll need to set the IgnoreManageReadOnlyState on the UserControl itself.  The UserControl is being enabled/disabled, which in turn, it enabling/disabling all of its child controls.
Chris Diesel
Chris Diesel
StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)StrataFrame User (126 reputation)
Group: StrataFrame Users
Posts: 74, Visits: 300
Everything is working good except that the usercontrol's field labels are disabled.  Why would they get disabled if they are not bound to a business object?  The labels that sit directly on the form don't enable/disable based on the editing state.  This is what I'm trying to prevent.

Thanks!
StrataFrame Team
S
StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)StrataFrame Developer (4.2K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
A UserControl is a ContainerControl and when set to Enabled=false, all child controls are disabled.  If you put several controls into a GroupBox and then set Enabled=false on the GroupBox, all of the child controls of the GorupBox will be disabled.  If the EditingState of the UserControl is following the business object, then when the UserControl is set to Enabled=false through the EditingState, then all child controls will be disabled.  It has nothing to do with the labels being bound and explicitly set to Enabled=false.  In fact, the labels aren't ever touched.  But since they belong to a parent ContainerControl that was disabled, they get disabled, too.
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