You could set Criteria parameter of generated ListRequest that is about to be submitted in your XYZGrid.cs like below:
protected override bool OnViewSubmit()
{
// only continue if base class didn't cancel request
if (!base.OnViewSubmit())
return false;
// view object is the data source for grid (SlickRemoteView)
// this is an EntityGrid so view.Params is a ListRequest
var request = (ListRequest)view.Params;
// we use " &= " here because otherwise we might clear
// filter set by an edit filter dialog if any.
request.Criteria &=
new Criteria(ProductRow.Fields.UnitsInStock) > 10 &
new Criteria(ProductRow.Fields.CategoryName) != "Condiments" &
new Criteria(ProductRow.Fields.Discontinued) == 0;
return true;
}
You could also set other parameters of ListRequest in your grids similarly
ListRequest.IncludeDeleted
This parameter is only useful with rows that implements IIsActiveDeletedRow interface. If row has such an interface, list handler by default only returns rows that are not deleted (IsActive != -1). It is a way to not delete rows actually but mark them as deleted.
If this parameter is True, list handler will return all rows without looking at IsActive column.
Some grids for such rows have a little eraser icon on top right to toggle this flag, thus show deleted records or hide them (default).
//OnViewSubmit is a good place to set this parameter (and some others):
protected override bool OnViewSubmit()
{
if (!base.OnViewSubmit())
return false;
var request = (ListRequest)view.Params;
request.ExcludeColumns = new List<string> { "Notes" }
return true;
}