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

[Solved] Client Side Filtering Issues

1 Answer 99 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jordan
Top achievements
Rank 1
Jordan asked on 25 Aug 2010, 11:30 PM
I am using a simple cookie-based persistence scheme in order to maintain data grid filter, sort, and grouping settings for each user on a given data grid.  The code I am using is as follows:

events.OnDataBinding(() => {                                %>
    function(e) {
        if (isLoaded) {
            var grid = $(this).data('tGrid');
 
            if (grid != undefined) {
                setCookie('user-assignment-grid-filterBy',grid.filterBy, null);
                setCookie('user-assignment-grid-groupBy',grid.groupBy, null);
                setCookie('user-assignment-grid-orderBy',grid.orderBy, null);
            }
        }
    }   
<% });
 
events.OnLoad(() => { %>
    function(e) {
        setTimeout(function() {
            var grid = $("#assignment-grid").tGrid().data('tGrid');
 
            if (grid != undefined) {
                var filterBy = getCookie('user-assignment-grid-filterBy');
                var groupBy = getCookie('user-assignment-grid-groupBy');
                var orderBy = getCookie('user-assignment-grid-orderBy');
 
                if (orderBy != undefined && orderBy != '') grid.orderBy = orderBy;
                if (filterBy != undefined && filterBy != '') grid.filter(filterBy);
                if (groupBy != undefined && groupBy != '') {
                    var groups = groupBy.split('~');
                                                 
                    for(var index = 0; index < groups.length; index++) {
                        var group = groups[index].split('-');
                                                     
                        grid.group(grid.columnFromMember(group[0]).title, group[1]);
                    }
                }
 
                grid.ajaxRequest();
            }
 
            isLoaded = true;
        }, 10);
    }
<% });

The sorting and grouping are working great.  The results are displayed as expected, both visually and in terms of the data content/organization.  The only issue that I am having is with the filtering of the data grid.  

I find that the data is being filtered properly, but that the visual cues are having issues.  The filter icons are not displaying that there are active filters being applied to columns.  Not only that, but when you select a filter icon and display the filter dialog, there are no values present.

Any ideas on this would be a big help?  My code is using Telerik Controls Q1 2010 SP 2.  If there is any more information that I can provide, please let me know.

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 26 Aug 2010, 07:17 AM
Hello Jordan,

 This is by design. Filtering through the API currently does not update the filtering UI.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Jordan
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or