Managing Control Editing State


Author
Message
Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
I'm creating a workflow application and one of the requirements is that the ability to edit individual fields of an object varies depending on the current status of the object in the workflow. This can be done in in the UI but I'm looking for a way to manage it at the BO level and let the SF data binding handle the read only state of the fields on the form. Is this doable? I've tried setting the BindingEditable property of the bound control to false but that didn't work. I also took a look at the ProperyDescriptor but didn't find anything that would work.

-Larry

Replies
Larry Caylor
Larry Caylor
StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)StrataFrame VIP (1.8K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
OK after a little more experimenting I found that the BindingEditable property is observed if the IgnoreManagedReadOnlyState for the control is set to True; so I can get the behaviour I'm looking for by setting both properties at the BO level.

Which leads to another question; my knowledge of system.predicate is pretty much zeroUnsure. How do I find the index of a bound control in the BoundControls collection given the field name?

-Larry

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
Sorry for the delay on this...I missed this post.  You could create a method to enumerate through the bounds controls.  To cycle through the collection, just do this.  You can then type of the "item" as a control to changed the editing state if you ned to.

For Each Item As MicroFour.StrataFrame.UI.Windows.Forms.IBusinessBindable In Me.BoundControls
       If Item.BindingField.Equals("MyFieldName", StringComparison.OrdinalIgnoreCase) Then
           CType(Item, System.Windows.Forms.Control).Enabled = False
       End If
Next

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