This one is annoying as I went through this once before & can't for the life of me remember what the solution is.
I've got a Grid on a form that is tied to a Primary Collection. A Filter is applied based on the selection made in a Drop List. When a Button is pressed, the Filter is set and the Primary Collection is refreshed. If I look at the number of elements in the Primary Collection, it is returning the correct number of records. However the Grid is not displaying them. It is showing that it has been modified (Red * next to the first column).
How do I get the Grid to display the results of the newly filtered Primary Collection?
Current FormScript for the event:
public void CheckActiveRestocks(string pRestockLoc, string pWarehouse, string pRank)
{
if (String.IsNullOrEmpty(pRestockLoc))
{
Application.ShowMessage("Please select a restock location.");
return;
}
Application.ShowMessage(ThisForm.PrimaryIDOCollection.GetNumEntries().ToString());
ThisForm.PrimaryIDOCollection.Filter = String.Format("(Loc LIKE '{0}%') AND (ilocUf_qvi_RestockTransitLoc <> NULL) AND (Whse='{1}') AND (Rank={2})",pRestockLoc,pWarehouse,pRank);
Application.ShowMessage(ThisForm.PrimaryIDOCollection.Filter);
ThisForm.PrimaryIDOCollection.Refresh();
Application.ShowMessage(ThisForm.PrimaryIDOCollection.GetNumEntries().ToString());
ThisForm.GenerateEvent("StdFormRefresh");
}