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

Filter not getting reset

1 Answer 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sagar
Top achievements
Rank 1
Sagar asked on 10 Jan 2012, 09:02 PM
I have a radgrid and i used AllowFilteringByColumn ="true" to filter the columns. The filtering works perfect. Now, i also have a tree beside this grid. depending on the node clicked i update the grid. The problem occurs when :

1. on an existing grid, i applied a filter. The result is perfect.

2. Now, when i click another node in the tree, a new grid is coming up (but with the same filter as previous). In my ocndition, when i click another node the filter shouldn't be applied. so this is what i did :

Private Sub RadTreeView1_NodeClick(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles RadTreeView1.NodeClick
        For i As Integer = 0 To RadGrid1.Columns.Count - 1
            RadGrid1.Columns(i).ResetCurrentFilterValue()
        Next
        RadGrid1.DataSource = Nothing
        RadGrid1.Rebind()       
    End Sub

But it is not working. The new grid result has filter on it. Can some one please tell me how to remove the filter in the code behind. Thanks

1 Answer, 1 is accepted

Sort by
0
Sagar
Top achievements
Rank 1
answered on 10 Jan 2012, 09:47 PM
Fixed. This worked :

Me.RadGrid1.MasterTableView.FilterExpression = ""
Tags
Grid
Asked by
Sagar
Top achievements
Rank 1
Answers by
Sagar
Top achievements
Rank 1
Share this question
or