Enable/Disable Controls...


Author
Message
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
I notice that on a Maintenance form when you place strataframe controls (TextBox, Combobox, etc.) on the maintenance form, they are all disabled by default, until the Edit button is pressed.



Is there a way I can leverage that same functionality on other forms? I have a form with a bunch of comboboxes and I would like all of the comboboxes to be disabled until a choice is made from the first one. Just wondering... if not i'll use a for each loop.
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
The controls are disabled because the business object control's their editable state.  This functionality works on other forms as well, as long as the controls are bound to the business object.  So, bind the controls you want to disable to the business object, and when you make your selection within the first combo box, call Edit() on the business object, which will enable the controls. 

FYI, if you ever need to disable that functionality, you can set the IgnoreManageUIReadOnlyState property to True on the control(s) you want to ignore the business object.  You can also set the property on the business object itself, which will cause the business object to quit managing all of its bound controls.

Ricardo Quartier
Ricardo Quartier
StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)
Group: Forum Members
Posts: 87, Visits: 779
IgnoreManageUIReadOnlyState, this is great cause I have a list box on a form, and since it's disable, I cannot scrool down, until i hit the edit button.... Now it will works.. thanks....
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
No problem Ricardo.  That property is very useful, but many people don't know it's there.
Ricardo Quartier
Ricardo Quartier
StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)StrataFrame User (145 reputation)
Group: Forum Members
Posts: 87, Visits: 779
Yeah, but now they can be aware... nice forum... BigGrin
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
I have a DevExpress calc edit control bound to the BO and it doesnt appear that the BO is managing the calc edit's editable state. Any ideas?
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
I just tested an inherited CalcEdit control bound to a business object and it was disabled and endabled properly... you might check both the control and the business object to make sure the IgnoreManageUIReadOnly state property and the ManageUIReadOnlyState property are False and True respectively.
StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
I just tested an inherited CalcEdit control bound to a business object and it was disabled and endabled properly... you might check both the control and the business object to make sure the IgnoreManageUIReadOnly state property and the ManageUIReadOnlyState property are False and True respectively.

I checked the BO and the ManageUIReadOnlyState property was set to True. I checked the CalcEdit control and couldn't find the IgnoreManageUIReadOnly state property. What do you mean inherited?

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
He meant to say "used" not inherited.  I just tested this and it is working.  So you more than likely have the IgnoreManageReadonlyState property set to True and it needs to be set to False.  See the property sheet image below.


StarkMike
StarkMike
Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)Advanced StrataFrame User (738 reputation)
Group: Forum Members
Posts: 436, Visits: 944
Ok I looked again and didnt see it.  Attached is a screen shot of the properties for my CalcEdit.  My CalcEdit control is from DevExpress and I didnt see a StrataFrame one.

Thanks

Attachments
calcedit prop.jpg (162 views, 112.00 KB)
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