Hi There,
How can we refresh a single row on the datagrid which was binded to ERLB of BusinessBase child object. We have to refresh the datagrid row showing any latest changes from the database just before record is entering into edit mode. Is there any way we can do this either at ERLB end or BB level? Please let me know.
Thanks Regards
Well your BB object contained within the ERLB instance should be a root object. You might be able to add a refersh method to the BB class, which would update all your properties and then send an unknown propertychanged. I think it could work in theory at least..
Thanks again ajj3085, I have implemented this approach works well. Here is my code snippet,
Public Sub Refresh()
Me.DoRefresh()
End Sub
Private Sub DoRefresh()
'Get most recent data from the db.
'Dont use Me.BypassPropertyChecks here
'Populate BB properties with latest data from db.
End Sub
Best Regards
Well the idea of the Refersh method on the BB subclass would be that it internally uses a command object to use as a DTO, which includes using the dataportal to fetch the relevent data, and then update itself.
so your refresh would look like this:
public void Refresh() {
var getLatestDataCmd = DataPortal.Execute<DataCmd>( new DataCmd( myId ) );
// update properties here
}
Copyright (c) Marimer LLC