Roger Blanchard
447 posts
Registered:
29 Jun 2018
17 Jan 2019
in reply to
Mike Fechner
Link to this post
Hey Mike,
Thanks for your guidance. The following seems to work.
I added an AfterDisplayError event to the OspreyViewerControl.
DEFINE PUBLIC EVENT AfterDisplayError DELEGATE System.EventHandler.
I then added an OVERRIDE for DisplayError in the OspreyViewerControl that would Publish the AfterDisplayError.
In my SmartWindowForm I subscribed to that event where I check the SmartTableIostate of the Viewer. If it is FieldsDisabled then we set the FirstTab.
gain, thanks for the guidance.
/*------------------------------------------------------------------------------
Purpose:
Notes:
------------------------------------------------------------------------------*/
@VisualDesigner.
METHOD PRIVATE VOID AdjInvViewer_AfterDisplayError( INPUT sender AS System.Object, INPUT e AS System.EventArgs ):
/* Roger Blanchard / Osprey Retail Systems Jan 17, 2019
This would be nice to solve the isseue when trying to delete. However,
if we are creating new run and an error is returned becuase we are missing required
info we would not want to SelectTheFirstTab.
The best we can do is check the SmartViewer:SmartTableIOstate and if it
is FieldsDisabled then select the FirstTab. If the fields are disabled then
we cannot be updating the data.
*/
IF THIS-OBJECT:AdjInvViewer:SmartTableIOState = "FieldsDisabled" THEN
THIS-OBJECT:ultraTabControl1:PerformAction(Infragistics.Win.UltraWinTabControl.UltraTabControlAction:SelectFirstTab).
RETURN.
END METHOD.