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

Programmatic Grid on Page Init Multicolumn Filtering Not Working

6 Answers 41 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Manuel Ortiz
Top achievements
Rank 1
Manuel Ortiz asked on 11 May 2010, 01:06 AM
Hi, I implemented a programatically created grid on Page Init as in this example.  I have some columns with AutopostbackOnFilter=true and others that use the generic filter dropdown to get filtered.  However, when I filter by one column it works great, but when I want to filter by a second one (filter by one and then filter by the other one (2 active filters)) it erases the value from the first filter and only filters by the last one.

Is there any know solution to this issue since the grid is entirely created on Page Init??

Thanks,
Manuel

6 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 13 May 2010, 02:33 PM
Hello Manuel,

I followed your steps in order to replicate the problem directly in the online demo but to no avail. Could you please check which columns filter textbox value is lost, the template ones or all of the columns?

Regards,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Manuel Ortiz
Top achievements
Rank 1
answered on 13 May 2010, 09:23 PM
Hey Iana,

The filter textbox value is lost on all columns, not regarding if they are template columns or not.

Regards,
Manuel
0
Manuel Ortiz
Top achievements
Rank 1
answered on 13 May 2010, 09:31 PM
Another important thing... I am ajaxifying the grid with RadAjaxManager from Code-Behind as in the Demo.

-Manuel
0
Iana Tsolova
Telerik team
answered on 14 May 2010, 09:04 AM
Hi Manuel,

The RadAjaxManager dynamic settings should not be the cause of the problem.
Could you please open a formal support ticket and send us a runnable sample there or at least provided the whole code for the grid you are using? We will check it and turn back to you with our findings.

Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Manuel Ortiz
Top achievements
Rank 1
answered on 14 May 2010, 07:11 PM
 Hello, I was consulting the legal department about sending you the code behind but due to company restrictions I cannot do that.

However, I can tell you that I followed the exact same instructions of the grid on page-init demo.  The only difference is that I enabled filtering and AutoPostBackOnFilter to True in some of the columns.  By further testing I have found that when I don't include the CurrentFilterFunction in the column's declaration, the value of the column's filter is never persisted after postback.  However, If I include a CurrentFilterFunction in the column declaration, the value is always persisted; but If I change the filter function in the filter's dropdown it returns to the CurrentFilterFunction declared in the column declaration. 

In other words, If I have CurrentFiterFunction set to "EqualTo" and I change it to "GreaterThan" using the filter's control dropdown, it filters by greater than but in the subsequent postback it goes back to "EqualTo" nevertheless I want it to stay on "GreaterThan" when I am filtering other columns.  I have checked and re-checked everything and it looks perfect.  I have no idea what else I can do.

Thanks,
Manuel
0
Iana Tsolova
Telerik team
answered on 15 May 2010, 02:48 PM
Hello Manuel,

In order to overcome the described issues with the CurrentFilterValue and CurrentFilterFunction, I would suggest you to set the for the desired columns on initial load, i.e. in if(!IsPostBack) statement instead of on each Page_Init.

Check it out and let me know how it goes.

All the best,
Iana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Manuel Ortiz
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Manuel Ortiz
Top achievements
Rank 1
Share this question
or