Linq Output to Grid?

So the dataview you pass onto this function is your BAQDataView in your case
baqViewMtlList

1 Like

duh, of course it is! Refresh the BAQview, not the DataView.

So this now loads the whole BAQ on launch… if I change the txtbox it refreshes to just that data required. I’m calling RefreshBAQDataView at the end of the CreateMtlListBAQView method, it that right?

Right, that should work… hmmm let me do some testing coincidentally I’m doing a similar thing.

1 Like

so for what it’s worth, I added the RefreshBAQDataView on a button click to see if it was an order timing issue and its not. The button runs the refresh, but without the pub&sub…

If I then change the txtJobNum the view refreshes with the pub&sub, if I then click the button again it refreshes with the pub&sub as well.

Yeah BPMData is being an ass about notifications. I’m playing with it having the same issue stand by

here you go just publish the initial value again at the end of the call.

pub.PublishInitialValue("5672258",true); //where the 5672258 is the value of your Character01
1 Like

Awesome @josecgomez, that worked! Thanks.

Now one more related question, if I may.

I only what to display current Job, Asm, Op related mtls. Can I filter the BAQview or the grid after the JobNum pub&sub?

I tried a few things but keep getting ‘Key not found’, but I assume it’s the field name fomr the BAQ that I need to referance?

this.eugMtlGrid = (EpiUltraGrid)csm.GetNativeControlReference("69865313-9f67-4cb2-9ae5-6183f1b65920");
this.eugMtlGrid.DisplayLayout.Bands[0].ColumnFilters["JobMtl_AssemblySeq"].FilterConditions.Add(FilterComparisionOperator.Equals,iAsmSeq);
this.eugMtlGrid.DisplayLayout.Bands[0].ColumnFilters["JobMtl_RelatedOperation"].FilterConditions.Add(FilterComparisionOperator.Equals, iOprSeq);

No need just subscribe to the other fields too
Same as you did above just do it for each of the 3 fields

Was in the car but basically what I’m saying is you can subscribe the BAQ to multiple fields.
So just as you are passing in Char01 as your jobnum you can pass in assy in char2 and opr in char3
Then do the subscription
IE:

 var yearBinding = "UD01.Year_c";
        var typeBinding = "UD01.Type_c";
 
        oTrans.PublishColumnChange(yearBinding, Guid.NewGuid().ToString());
        oTrans.PublishColumnChange(typeBinding, Guid.NewGuid().ToString());
        var yearPub = oTrans.GetPublisher(yearBinding);
        var typePub = oTrans.GetPublisher(typeBinding);
 
        // subscribe our BAQ view
        // NOTE: In E10 field names use the format with an underscore. will no longer work.
        bdvLeaveUsage.SubscribeToPublisher(yearPub.PublishName, "Calculated_PayRollYear");
     

        bdvLeaveUsage.SubscribeToPublisher(typePub.PublishName, "LaborDtl_IndirectCode", "like");

The above subscribes to both Year_c and Type_c

That worked, thanks again!