BAQView Replacing a Grid Binding (Multiple columns)

Hi,

We are trying to do the following but binding on 2 or more columns. The tutorial below shows how to do it with 1 but we need to bind on more. I believe this tutorial was made by a member of this forums. Please share if you can assist.

Youtube - BAQView Replacing a Gird Binding

The code we used for 1 column was this one:

public void CreateOrderLinkBAQView()
{
	BAQDataView baqViewOrderLink;
	baqViewOrderLink = new BAQDataView("CaseOrderList");
	oTrans.Add("PSGCaseOrderBAQ",baqViewOrderLink);

	string pubBinding = "HDCase.HDCaseNum";
	IPublisher pub = oTrans.GetPublisher(pubBinding);
	if(pub==null)
	{
		oTrans.PublishColumnChange(pubBinding, "MyCustomPublish");
		pub = oTrans.GetPublisher(pubBinding);
	}

	if(pub !=null)
		baqViewOrderLink.SubscribeToPublisher(pub.PublishName, "OrderHed_HDCaseNum");
}

EZ
Just do the PublishColumnChange and Subscribe bit for each of the columns

Jose helped me out with this last week. Two columns…

public void CreateLateBAQView()
{
baqViewLate = new BAQDataView(“ETK_JobTrackerMatNoPar”);
oTrans.Add(“LateOpenJobMatBAQ”,baqViewLate);

	string pubBinding = "JobHead.JobNum";
	IPublisher pub = oTrans.GetPublisher(pubBinding);
	if(pub==null)
	{
		oTrans.PublishColumnChange(pubBinding, "MyCustomPublish");
		pub = oTrans.GetPublisher(pubBinding);
	}

	if(pub !=null)
		baqViewLate.SubscribeToPublisher(pub.PublishName, "JobMtl_JobNum");

	
	pubBinding = "CurrAsm.AssemblySeq";
	IPublisher pub2 = oTrans.GetPublisher(pubBinding);
	if(pub2==null)
	{
		oTrans.PublishColumnChange(pubBinding, "MyCustomPublish2");
		pub2 = oTrans.GetPublisher(pubBinding);
	}

	if(pub2 !=null)
		baqViewLate.SubscribeToPublisher(pub2.PublishName, "JobMtl_AssemblySeq");
}
2 Likes

Thanks Ken!

Will give it a go and let you know.

EDIT: Seems to be working great! Thanks again