I have a telerik grid and wrote a function to allow searching all the Grid text columns, by specifying the filter type and input, the function changes all the text columns filter expressions.
It used to work very well on Q1, in Q2 everything changed.
Function is the following, I need to know how to set filter expressions programmatically in the right way in Q2.
It used to work very well on Q1, in Q2 everything changed.
Function is the following, I need to know how to set filter expressions programmatically in the right way in Q2.
private void SetFilter(GridKnownFunction filterFnType, string searchInput)
{
FilterExpression filter;
string input = searchInput.Trim();
if (!string.IsNullOrEmpty(input))
{
foreach (GridViewDataColumn column in this._GridTextColumns)
{
filter = new FilterExpression(FilterExpression.BinaryOperation.OR, filterFnType, "@FilterEditor1");
filter.Parameters.Add("@FilterEditor1", input);
column.FilterDescriptor = filter;
}
}
else
{
this.grid_Data.MasterTemplate.FilterDescriptors.Clear();
}
}