StrataFrame Forum

Navigate

http://forum.strataframe.net/Topic528.aspx

By Daniel Essin - 2/9/2006

It appears that a call to BO.Navigate(First) returns false if the first record is already the current record.



Is this interpretation correct?

Is that what you intended?
By Gary C Wynne - 2/9/2006

Hi Daniel

This "bit" me very early on and I reported it to the StrataBoys. This was and still is the behaviour and "is by design". In point of fact, the record hasn't actually moved so, "Navigated" is not a correct conclusion.

I'm not entirely sure I concur but, for now, you will just have to handle the situation.

HTH

-=Gary

By Trent L. Taylor - 2/10/2006

Gary is correct and this is by design.  Since the record position has not moved, no navigation has taken place.  This is done on the navigate because of the events that are associated with the method calls.  Since the navigate calls the Navigating and Navigated events, and controls bound to data are affected by the navigation, events are only raised and the method call only returns True when the position moves.

However, there is a solution.  You can use the Move methods is conjunction with the navigate methods.  The Move methods will always return a response if the move was valid even if the record position did not change.  For example, you could do the following:

If MyBO.MoveFirst()
    Do
         '-- PLACE CODE HERE
    While MyBo.Navigate(MicroFour.StrataFrame.Business.BusinessNavigationDirection.Next)
EndIf

By Daniel Essin - 2/10/2006

ah...