This is a migrated thread and some comments may be shown as answers.

AutoPostBackOnFilter no longer working

4 Answers 108 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Curt
Top achievements
Rank 1
Curt asked on 28 Jan 2009, 09:58 PM
I had written some code to re-use for each of my grids that sets the filtering functions across my whole project.  In the grid I define:

OnInit="RadGridFilter_Init"

protected void RadGridFilter_Init(object sender, EventArgs e)
    {
        Misc.RadGridFilterOptions(sender, e);
    }

public static void RadGridFilterOptions(object sender, EventArgs e) 
        { 
            RadGrid rg = (RadGrid)sender; 
            rg.EnableLinqExpressions = false
 
            rg.GroupingSettings.CaseSensitive = false
 
            //Setting the available filter options 
            GridFilterMenu menu = rg.FilterMenu; 
 
            for (int i = menu.Items.Count - 1; i >= 0; i--) 
            { 
                if (menu.Items[i].Text == "NoFilter" 
                        || menu.Items[i].Text == "Contains" 
                        || menu.Items[i].Text == "EqualTo" 
                        || menu.Items[i].Text == "GreaterThan" 
                        || menu.Items[i].Text == "LessThan" 
                        || menu.Items[i].Text == "StartsWith"
                { 
                    i--; 
                } 
                else 
                { 
                    menu.Items.RemoveAt(i); 
                } 
            } 
             
 
            foreach (GridColumn column in rg.Columns) 
            { 
                if (typeof(System.String) == column.DataType) 
                { 
                    column.AutoPostBackOnFilter = true
                    column.CurrentFilterFunction = GridKnownFunction.Contains; 
                } 
                else  
                { 
                    column.AutoPostBackOnFilter = true
                    column.CurrentFilterFunction = GridKnownFunction.EqualTo; 
                } 
            } 
        } 
This would allow my grids to have the CurrentFilterFunction set for each column and enable autopostback.  This worked until we updated to the newest release (1-14-09).  Now if I disable the lines that set the autopostbackonfilter to true it will work but otherwise only one column will filter and then any other column's filtering ability is broken.

To re-cap, when I filter the first column as soon as I type in text and hit tab, the column filters the grid correctly.  However, as soon as I try to filter another column the gird appears to do an ajax call back but nothing changes.  Am I missing something in the newest release or is this a bug.  It worked before.

Thanks



4 Answers, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 02 Feb 2009, 07:57 AM
Hi Brent,

Indeed the AutoPostBackOnFilter feature is not working as expected in our latest release. Our developers already fixed this issue and you can download our latest internal build (from the downloads section of your client.net account) for a hotfix. Try it and let us know if it addresses the problem for you. For your feedback I have updated your Telerik points.

Sincerely yours,
Pavel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Damian Fabri
Top achievements
Rank 1
answered on 11 Feb 2009, 03:48 PM
i need the same build in client area

dfabri@arrayworks.com

thanks.
0
Sebastian
Telerik team
answered on 11 Feb 2009, 04:00 PM

Hi Damian,

You should be able to download the latest internal build from your account following the link below:

http://www.telerik.com/account/latest-internal-builds.aspx

Best,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Curt
Top achievements
Rank 1
answered on 11 Feb 2009, 04:02 PM
Their internal build did not fix my problem.  Depending on what you are doing it may fix yours.  They provided a work around that was not acceptable for our scenario.  I am waiting for them to provide a fix (not a work around that requires me to hardcode every grid prerender event).
Tags
Grid
Asked by
Curt
Top achievements
Rank 1
Answers by
Pavel
Telerik team
Damian Fabri
Top achievements
Rank 1
Sebastian
Telerik team
Curt
Top achievements
Rank 1
Share this question
or