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

get_filterExpressions not working

3 Answers 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 2
Stephen asked on 28 Jul 2009, 02:41 AM
I am trying to retrieve the filter client-side to pass to a dialog window being displayed.  I am calling the get_filterExpression() method on the MasterTableView but an empty string is being returned.  Is this a bug or does it require something special.

function GetFilterData() {  
 
    var filterString = "";  
      
    var filter = $find(GridMasterView).get_filterExpressions();  
    for (var i = 0; i < filter.length; i++)  
        filterString += filter[i].get_columnUniqueName() + "~" + expression.get_fieldValue() + "~";  
          
    return filterString;  
          

Please let me know how I can accomplish this.

Thanks

Stephen

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 28 Jul 2009, 07:20 AM
Hello Graham,

Here's a forum link which discusses on how to get your filter expression on client. This should probably help you out.
Getting FilterExpression Client-Side

Thanks
Princy.
0
Stephen
Top achievements
Rank 2
answered on 28 Jul 2009, 08:34 AM
So effectively what you are saying is that the function to get the filter expression client-side doesn't work.  This solution is basically a hack to bypass the client-side function.  However, how does this work in an ajax situation where only the grid is updated?
0
Veli
Telerik team
answered on 30 Jul 2009, 02:43 PM
Hello Stephen,

RadGrid's client-side filtering and sorting expressions are maintained only for client-side binding. They are not mirrored from and to the server-side properties. Therefore, the post that Princy referred to, demonstrates the only way you can access server-side properties on the client, i.e. by saving them to hidden inputs.

Regards,
Veli
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
Grid
Asked by
Stephen
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Stephen
Top achievements
Rank 2
Veli
Telerik team
Share this question
or