Rules not being checked on save?


Author
Message
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I  have created a user control which does maintenance on a business object.  It's like the maintenance strip where you can set a BO to it, and on button clicks it will call Save, Delete, Undo, etc.  I have the following code in the form's New where MaintStrip is the user control I have created and HdrBO is the BO to perform actions on.

HdrBO.ParentContainer = Me
Me.BusinessObject = HdrBO
Me.BusinessObjects.Add(HdrBO)
Me.PrimaryBusinessObject = HdrBO
MaintStrip.BusinessObject = HdrBO

Most everything works except a couple of things: 

When I save, the rules don't seem to be getting checked.  I put a break in CheckRulesOnCurrentRow in the BO and it's not getting hit.  What determines when this is called and why might I not be hitting it?  It is checking the RequiredFields collection because I am getting the Errors popping if I leave something blank.  Just not checking the business rules.

Also, I have an enhanced list on the form that is linked to the same business object.  Is there an easy way to keep up with the FocusedRow on this list?  Right now, I am having to call Requery after editing the BO, and then the focus jumps to the first row no matter what.  I would like for the focus to go to whatever row was just added, or if there was a delete to the row after the one which was deleted.  Any properties I can set or methods I can use to accomplish this easily?

 

 


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