Hi
I have an application that had a telerik Rad Grid, with filtering enabled.
The application can be opened via another application, passing filters to the first 2 columns like below. However when passing the filters like this the rows are not reflecting what is in the filter. If I was to manually enter the value in the filter it will work.
I have this in my code for ItemDatabound
protected void rg_CallDetails_ItemDataBound(object sender, GridItemEventArgs e)
{
if (!Page.IsPostBack)
{
if (!string.IsNullOrEmpty(department))
{
rg_CallDetails.MasterTableView.FilterExpression = "([Department] " + "LIKE " + "\'%" + department + "%\' AND [CallNumber] " + "LIKE " + "\'" + callTypePre + "%\' ) ";
GridColumn column = rg_CallDetails.MasterTableView.GetColumnSafe("Department");
column.CurrentFilterFunction = GridKnownFunction.Contains;
column.CurrentFilterValue = department;
//rg_CallDetails.MasterTableView.FilterExpression = "([CallNumber] " + "LIKE " + "\'" + callTypePre + "%\') ";
GridColumn columnCallType = rg_CallDetails.MasterTableView.GetColumnSafe("CallNumber");
columnCallType.CurrentFilterFunction = GridKnownFunction.Contains;
columnCallType.CurrentFilterValue = callTypePre;
rg_CallDetails.MasterTableView.Rebind();
}
}
}
But the application errors with stackoverflow exception error on the rebind.
I have tried rg_CallDetails.Rebind()
But also gives the same error.
Any advise please?
Thanks