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

[Solved] "Clear Filter" fires Filtered Event but count of grid is wrong

1 Answer 63 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jingying Wu
Top achievements
Rank 1
Jingying Wu asked on 30 Jul 2009, 09:10 PM
I'm showing the number of rows in the grid and have the filtered event hooked.

Example:i have 10 records in all, now filter on Owner="Jingying"

RadGridView.Records.Count returns 1

Now, when i click "Clear Filter",
Expected result: RadGridView.Records.Count returns 10
Actual result: RadGridView.Records.Count still returns 1

Let me know if there's an alternative to this that i can use.
thanks.

1 Answer, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 31 Jul 2009, 06:25 AM
Hello Jingying Wu,

That is a bug in Q1 but you could try running your logic through the Dispatcher:

void RadGridView1_Filtered(object sender, GridViewFilteredEventArgs e)  
{  
    this.Dispatcher.BeginInvoke(  
        (Action)delegate 
    {  
        // execute code  
    });  
} 

The correct record count should be available in the delegate.

All the best,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Jingying Wu
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or