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

[Solved] Turning filtering on by the user

3 Answers 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 12 May 2008, 04:42 PM
I wanted to setup my grid so that the user can turn filtering on when they want to, this will just remove the clutter when filtering is not needed. All I do is start off with AllowFilteringByColumn="false" and then when the filtering checkbox I added to the page is checked, I set the AllowFilteringByColumn in the codebehind to true. This seems to turn on the filtering but it doesn't apply it when a filter is selected. Everything works fine if I just set filtering to true in design mode.

Is this a bug, am I doing something wrong?

Thanks.

3 Answers, 1 is accepted

Sort by
0
Tim
Top achievements
Rank 1
answered on 12 May 2008, 08:17 PM
After looking into other issues I was having w/ the grid, it seems to have all centered around the fact that I had a DataBind in my PreRender regardless if the the NeedsDataDource fired or not. After resolving that, all other behavioral issues cleared up.

Tim
0
Princy
Top achievements
Rank 2
answered on 13 May 2008, 06:33 AM

Hi Tim,

The built-in features like Sorting,Filtering etc will work only with AdvanceDataBinding techniques and also you should never call the DataBind() method from inside the NeedDataSource handler or mix simple data-binding mode with advanced data-binding.

Advanced data-binding

Princy.

0
Tim
Top achievements
Rank 1
answered on 13 May 2008, 12:18 PM
Thanks Princy, that was helpful. I removed the DataBind from my prerender event and now it is clear what is needed.

Tim
Tags
Grid
Asked by
Tim
Top achievements
Rank 1
Answers by
Tim
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or