I have a <telerik:RadGrid> which contains some <telerik:GridBoundColumn> elements. Until now the AutoPostBackOnFilter value was set to true. This means the grid had its contents updated every time I left the focus of one of the GridBoundColumns. This is not a desired behavior anymore. Now I just want to trigger the filtering manually by let's say clicking on a button. So I set all the AutoPostBackOnFilter values to false and created a button with the according serverside event handler, which is empty so far :)
How could I implement this requirement?
Thanks in advance!
5 Answers, 1 is accepted
This requirement is the default behavior of the built-in functionality provided by RadGrid:
Hope this helps.
Correct me if I am wrong but what you are suggesting is to use ShowFilterIcon="true", am I right? Those FilterIcons make the user chose a FilterFunction. I have all my FilterFunctions defined within <telerik:GridBoundColumn>.
What I want is simply to trigger filtering by pressing a simple <button> or a <asp:Button>. Is this possible?
In order to implement the functionality you can handle the client-side click event of the button control and call the filter() function for a given column.
Alternatively you can use server-side logic and modify the FilterExpression of RadGrid manually. Check out the following article that describes the approach in more detail.
The grid provides the AutoPostBackOnFilter property and also the FilterDelay property, which are different functionalities:
Executing the filter option specifically on enter key is also an option and can be achieved using the following approach: