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

[Solved] Filtering causes page to go blank

3 Answers 276 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bob Uva
Top achievements
Rank 1
Bob Uva asked on 13 Nov 2009, 01:28 AM
I'm using a RADGrid, with AllowFilteringByColumn set to true, and am setting the DataSource property in my page's OnLoad handler in code-behind. I don't call DataBind(). When I enter something in a filter field and choose 'Contains' (or anything) from the list of filter types, the page reloads but is completely blank. What am I doing wrong?

Thanks,
 Bob

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 13 Nov 2009, 05:49 AM
Hello Bob,

Try binding the Grid in its NeedDataSource event rather than binding it in the PageLoad event. For advanced features such as Filtering, the grid must be bound through the NeedDataSource event, which will automatically accommodate the appropriate database operations without the need of explicitly handling filtering operations. Here's an online demo that you can refer to inorder get more details about AdvancedDataBinding techniques.
Advanced data-binding

Thanks
Princy.
0
Bob Uva
Top achievements
Rank 1
answered on 13 Nov 2009, 07:20 PM
Princy,

I was able to get the grid to rebind by moving the assignment of DataSource to the NeedDataSource event handler. But the same data gets displayed in the grid even when I choose to filter. Is there something else I have to do, maybe in the NeedDataSource event handler, to apply that filter?

Bob
0
Bob Uva
Top achievements
Rank 1
answered on 13 Nov 2009, 09:59 PM
Don't know exactly what I did, but the filtering is working fine now.

Thanks,
 Bob
Tags
Grid
Asked by
Bob Uva
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Bob Uva
Top achievements
Rank 1
Share this question
or