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

Filtering Mode: Filter Row

2 Answers 67 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Charles Benoualid
Top achievements
Rank 1
Charles Benoualid asked on 24 Sep 2013, 01:57 PM
Hi, right now we are using index property in our RadGridView. Since we use ItemsSourceBinding in GridViewComboBoxColumn I had to program a Custom Popup Filter to be able to search using text instead of id in the grid. Problem right now is that im using Filtering Mode: FilterRow. How can I redefine the control? I mean right now when I click the filter it show numeric operator. I need text and text operator and I need to be able to define my own custom logic, since data type of column mismatch input type. It would be nice also If the user would not be force to click on the filter to filter.

Popup Filter --> Translate Text to equals ID

private void ExecuteFilter(object parameter)
        {
            if (!Column.DataControl.FilterDescriptors.Contains(CompositeFilter))
            {
                IEnumerable<int> ids = LookupItemDtos.Where(l => l.Display.Contains(SearchField)).Select(l => (int)l.Id);

                foreach (int id in ids)
                {
                    FilterDescriptor filter = new FilterDescriptor(Property, FilterOperator.IsEqualTo, id);

                    CompositeFilter.FilterDescriptors.Add(filter);
                }

                Column.DataControl.FilterDescriptors.Add(CompositeFilter);
            }

            IsActive = true;
        }

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Charles Benoualid
Top achievements
Rank 1
answered on 24 Sep 2013, 03:43 PM
Also, when using Filtering Mode: FilterRow. Is there a way to automatically select contains (for string column type) as soon as user type and filter on the fly. I also need a way to custom the filtering like the custom popup filter.
0
Dimitrina
Telerik team
answered on 26 Sep 2013, 01:49 PM
Hello,

You can check this forum thread and download a test project demonstrating how to customize the default behavior for the FilterRow.

I hope this helps.

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Charles Benoualid
Top achievements
Rank 1
Answers by
Charles Benoualid
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or