I am using a Telerik RadGrid and have custom filters set up on some of the columns. As part of that custom filter (which is just a textbox) I also have a button that when clicked I want to clear the filter value for that particular column only.
I have the button working and am setting the filter for the particular column to an empty string, then rebinding the grid but this does not remove the filter value.
It seems that only modifying the grid.MasterTableView.FilterExpression actually affects the filter but how can I remove just one column's filter values from the FilterExpression?
<telerik:RadTextBox ID="RdTxtC" EmptyMessage="Search" runat="server" EmptyMessageStyle-Font-Italic="true"
CssClass="padtop4" HoveredStyle-Font-Italic="true" ClientEvents-OnKeyPress="filterC"
InputType="Text" Width="80%">
</telerik:RadTextBox>
<asp:Button ID="ibtnClearFilterTown" ClientIDMode="Static" runat="server" CssClass="clearFilterButton" OnClick="ibtnClearFilterTown_Click"/>
In the code-behind:
protected void ibtnClearFilterTown_Click(object sender, EventArgs e)
{
RgClientList.MasterTableView.GetColumnSafe("TownCity").CurrentFilterValue = String.Empty;
RgClientList.Rebind();
}
It seems a fairly simple requirement to remove the filter for a single column so i think I must be missing something obvious - any help is appreciated....