G'day
To find out if you need to refresh you could use the ReceiveQueryNotifications method on the BO. Here's a snippet from the Documentation:
ReceiveQueryNotifications
The ReceiveQueryNotifications property determines whether a System.Data.SqlClient.SqlDependency will set to listen for Query Notifications that are registered on commands executed through FillDataTable(). When notifications are received, the ServerDataChanged method is raised allowing you to repopulate the business object due to changes within the server's data.
Note: To use Query Notifications, you must adhere to the following requirements:
- SQL Server 2005 only
- Properly formatted queries - Queries must follow the rules for a proper Indexed View query. See the Microsoft Developer's Guide for more information.
- Enable the broker service (ALTER DATABASE [database] SET ENABLE_BROKER) on the database.
Once you've determined that you need to refresh perhaps you could
1. If necessary save the current changes
if MyBO.IsDirty then MyBO.Save
2. Determine which row in the table you're in
Dim MyRow as Integer = MyBO.CurrentRowIndex
3. Refill the BO by whatever means
4. Get back to where you were
MyBO.Navigate(MicroFour.StrataFrame.Business.BusinessNavigationDirection.Absolute, MyRow)
5. Get back into edit mode
MyBO.Edit()
Hope this helps. I haven't used the ReceiveQueryNotifications property, but I read about it some time ago and thought it might be useful.
Peter