Activate Customizing for Items in ChoosefromList
Hi, we have a customizing running on value changed event in coresuite customized on the item field in a matrix. Our customer often chooses more than 1 item to add to the matrix with the choosefromlist. The problem is then the customizing is only triggered for line 1. Is there any possibility to get the customizing triggered for every item choosen in the choosefromlist with coresuite customize?
-
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 -10 -
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.
Comments
2 comments