EpiUltraComboPlus text/value changed event

Hello All!

I would like to perform some calculations in Purchase Order Tracker. I have a text box on the Lines -> Detail sheet and I need to put result in it. Result calculation is based on the Releases -> List sheet information. So every time when I change the line result needs to be calculated again.

I trying to fire an action after EpiUltraComboPlus value is changed. For testing I prepared simple code to show message box but it actually doesn’t work for me.

At the begening I need reference for the control

EpiUltraComboPlus linesComboRef1 = (EpiUltraComboPlus)csm.GetNativeControlReference("609f09c8-f864-4c0b-a0ac-6e0c92a4bdb0");

After that I assigned method to event

linesComboRef1.TextChanged += new System.EventHandler(showMsg);

Method which is handling the event

private void showMsg(object sender, EventArgs e)
{
    MessageBox.Show("test");
}

Does anyone had similar issue? How to invoke a method when text/value changed in this Combo?

Line level which field you are binding with Textbox, and Rel level what are fields you are using for calculation ?

TextBox on Lines->detail level is unbound.
Let say I would like to sum OurQty by looping for each Release and put that value into TextBox.

Use PORel EpiViewNotification, for sample call below code.

private void edvPORel_EpiViewNotification(EpiDataView view, EpiNotifyArgs args)
	{
		
		if ((args.Row > -1))
		{
			//var edvOrderRel = this.oTrans.Factory("OrderRel");
			//if(edvOrderRel != null)
			{
				var currentPOLine = Convert.ToInt16(view.dataView[args.Row]["POLine"]);
				var outQty = Convert.ToDecimal(view.dataView.Table.Compute("Sum(XRelQty)", string.Format("POLine = {0}", currentPOLine)));
				this.epiNumericEditorC1.Value = outQty;
			}
		}
	}
1 Like