BAQDataView with Filters + Row Rules acting wacky

I have a BAQDataView in a 10.2.700 Job Receipt to Inventory customization. On this dataview I have a filter that goes from showing all lines to only exceptions. I also have a row rule that when the Calculated_Exception field = ‘Y’, the line is yellow.

The filter works great. However, the Row Rule seems to lose it’s mind after flipping back and forth several times. Have you ever seen this behavior with filters and row rules before?

I have it defaulting to exceptions only and it shows great.

Then I switch to All and it shows great.

Then I switch back to Exceptions Only and it shows great. So far so good.
The 2nd time I go to All, the row rule is out of it’s mind. It does color the exceptions Yellow but it also colors 5 at the top yellow where exception is not Y.



Any ideas?

Julie you may need to trigger a oTrans.NotifyAll() or a specific baqDataViewName.Notify(...) event. To tell the Row Rules to re-paint themselves after your Filter Action.

// Used for additional BAQ filtering
private void FilterBAQDataView(BAQDataView iBaqView, string iWhereClause)
{
    iBaqView.AdditionalFilter = iWhereClause;
    iBaqView.dataView.RowFilter = iWhereClause;
    iBaqView.Notify(new EpiNotifyArgs(oTrans, 0, EpiTransaction.NotifyType.Initialize));
}

I already have that in my Filter code

	private void FilterTheGrids(string strFilter)
	{
		string str = strFilter;
		EpiDataView edvMat = oTrans.Factory("MaterialBAQDV");
		edvMat.AdditionalFilter = str;
		edvMat.dataView.RowFilter = str;
		edvMat.Notify(new EpiNotifyArgs(oTrans, 0, EpiTransaction.NotifyType.Initialize));

		EpiDataView edvOps = oTrans.Factory("OperationBAQDV");
		edvOps.AdditionalFilter = str;
		edvOps.dataView.RowFilter = str;
		edvOps.Notify(new EpiNotifyArgs(oTrans, 0, EpiTransaction.NotifyType.Initialize));
	}

Thank you, @hkeric.wci!! :grinning: .
The solution was that the 2nd parameter in the Notify needed to be set to the count of grid rows instead of 0.

2 Likes