Filtering UltraGrid and or DataView

I’m trying to made only certain PO Releases available for Mass Receipt based off of a date filter.

I am able to hide lines in the initial selection window with this code:

private void MassReceiptsForm_Load(object sender, EventArgs args)
{
	// Add Event Handler Code
            // Access eugMassReceipt UltraGrid (RcvDtlMassReceiptSelect dataview)
	EpiUltraGrid myGrid = (EpiUltraGrid)csm.GetNativeControlReference("bdd4c235-c3ed-4ace-8a8f-fc9eebaa58c6");
	foreach (UltraGridRow row in myGrid.Rows)
	{
		if (Convert.ToDateTime(row.Cells["DueDate"].Value) == DateTime.Today)
		{
			row.Hidden = true;
		}
	}  

}

My problem is that the Select All button still selects all available rows. These are not directly tied to the UltraGrid used above.

I can’t seem to find a way to change the value of a field in the RcvDtlMassReceipt dataview based off the same filter criteria. Any Suggestions?

This code will fitler an EpiDataView, not sure if that’s what you need or not…

String str = "ChildKey1 LIKE '" + txtTagFilter.Text + "%'";
    EpiDataView edv = oTrans.Factory("UD104A");
    edv.AdditionalFilter = str;
    edv.dataView.RowFilter = str;
    edv.Notify(new EpiNotifyArgs(oTrans, 0, EpiTransaction.NotifyType.Initialize));
1 Like

Kind of works. Still working on the the trigger to impliment it on. Put it in the screen load, but the dataview is reinitialized and populated after hitting select all. I’ll keep playing around with it. Thanks