BAQView with grid binding not updating on PartNum change

Good Afternoon,

We have some custom made BAQViews which add in some extra columns to our Purchase Advisor screen. The issue we have is that the results do not update on change of PartNum, they only change if the partnum is changed and the refresh button is pressed. Does anyone happen to know a way to fix this to refresh on change of partnum?

We did try to recreate it with Jose’s excellent video (BAQView Replacing a Gird Binding - YouTube) but still hit the same problem.

I have seen others have had the same issue but did not post if they managed to get it resolved or not.

image

In the above image you can see ‘Have I purchased this before - Yes’ which shows no results, but if resfreshed will return the results.

PurchaseAdvisorCode.txt (4.7 KB)

Code attached above.

Thank you in advance.

Hi David! Welcome!
I think you should use PartNum_Leave. That should trigger every time your cursor leaves the part number box. Make sure to check to see if the text box has a value before you try to update. I use something like this bit to trigger my refresh:

	void RefreshAllBAQs()
	{
		oTrans.PushStatusText("Refreshing all views. Please be patient...", false);      
		MainController.AppControlPanel.HandleToolClick("RefreshAllTool", new 
		Infragistics.Win.UltraWinToolbars.ToolClickEventArgs(MainController.MainToolManager.Tools["RefreshAllTool"], null)); 
		oTrans.PushStatusText("Done!", false);
		
	}

Not sure on the exact syntax, but something like this should do it for you:

	private void txtPartNum_Leave(object sender, System.EventArgs args)
	{
		// ** Place Event Handling Code Here **
		if (txtPartNum.value <> "")
		{
			RefreshAllBAQs()
		}
	}

Hi Nate,

Thank you for this, I will give this a try and post back my results. Thank you for the swift reply!

Hi Nate,

Tried getting this to work in our screen customization but cant get past this error;

Error: CS0103 - line 118 (814) - The name ‘MainController’ does not exist in the current context
Error: CS0103 - line 119 (815) - The name ‘MainController’ does not exist in the current context

Is this because MainController cannot be used in a screen customization and is only useable in a dashboard? Apologies, the custom coding side of epicor is not my best area so im still learning.

Thank you in advance.

I think you need to add a using statement to the top of your customized form. Unfortunately I am not sure which of these is the one you need. It might be reflection, but just add these one by one until the error goes away.

using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Ice.BO;
using Ice.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinGrid;
using System.Diagnostics;
using System.Reflection;