Skip to main content

Activate Customizing for Items in ChoosefromList

Comments

2 comments

  • Jannik

    Hi Bastian,

    Value changed on the field where the customer selects multiple likes like ItemCode?

    You could listen on Value change but don’t use the pVal.Row-1 variable for the matrix line. 
    Instead iterate through matrix lines and run your checks/updates on all matrix lines between current matrix line index = pVal.Row-1 and matrix max lines -1

    0
  • Lothar Hasenkämper

    Hi Bastian,

    or you set up the optimizer rule on FormLoadComplete and the code you work with a delegate

    // Lost Focus ItemCode
    	SwissAddonFramework.UI.EventHandling.ItemEvents.LostFocusEventHandler lostFocusHandler = null;
    	lostFocusHandler = delegate(SwissAddonFramework.UI.EventHandling.ItemEvents.LostFocus evLostFocus)
    		{
    		try
    		{
    			if (evLostFocus.ColUID.ToString() == "1" && oMatrix.GetValue("1", evLostFocus.Row - 1).ToString() !="")
    			{
    			// Do Something
    			}
    		}
    		catch(System.Exception exe5)
    		{
    			StatusBar.WriteError("Fehler beim Focus in ItemCode: " + exe5.Message);
    		}
    		};
    		// Eventhandler der Matrix hinzufügen		
    		oMatrix.AddHandler_LostFocus(ModeComponent.FormModes.ALL, null, lostFocusHandler);
    		
    		
    //	 Got Focus Qty
    		SwissAddonFramework.UI.EventHandling.ItemEvents.GotFocusEventHandler gotFocusHandler = null;
    		gotFocusHandler = delegate(SwissAddonFramework.UI.EventHandling.ItemEvents.GotFocus evGotFocus)
    			{
    			try
    			{
    				if (evGotFocus.ColUID.ToString() == "11")
    				// Do something
    				}
    			}
    			catch(System.Exception exe5)
    			{
    				StatusBar.WriteError("Fehler beim Focus in Spalte Menge: " + exe5.Message);
    			}
    			};
    		// Eventhandler der Matrix hinzufügen		
    		oMatrix.AddHandler_GotFocus(ModeComponent.FormModes.ALL, null, gotFocusHandler);

    regards Lothar

    0

Please sign in to leave a comment.