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

Change GridViewComboBoxColumn filtering type

8 Answers 261 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Fadi
Top achievements
Rank 1
Fadi asked on 16 Jan 2013, 07:25 PM
I have a telerik GridView contains ComboBoxcolumn, the filtering type when i search inside the Combobox Column is 'StartWith'. and I want to change it to 'Contains'. How could i do it?

8 Answers, 1 is accepted

Sort by
0
Jeff
Top achievements
Rank 1
answered on 16 Jan 2013, 08:03 PM
You can filter the bindingsource for that column. I do it like this:
TableBindingSource.Filter = "MyColumn = SomeValue"

Sometimes I bind a combobox to a DateView and those can be filtered and sorted just as easily.
Dim DV1 As DataView = New DataView(DataSet.MyTable)
DV1.Sort = "LookupName"
DV1.RowFilter = "ZipCode = 32401"
With ComboBox1
    .DataSource = DV1
    .DisplayMember = "LookupName"
    .ValueMember = "ID"
End With
0
Fadi
Top achievements
Rank 1
answered on 16 Jan 2013, 08:12 PM
Thanks permalink. And i do usually do the bindingsource.filter. But now i am using GridViewComboboxColumn. And i am filterimg it, but i meed the filter type. Or filter operator to be 'Contains' nit 'StartWith'.
0
Jeff
Top achievements
Rank 1
answered on 16 Jan 2013, 08:36 PM
Sorry if I'm misunderstanding you, but it sounds like you're looking for something similar to this:
TableBindingSource.Filter = "MyColumn Like %SomeValue%"
0
Plamen
Telerik team
answered on 17 Jan 2013, 02:34 PM
Hi guys,

Thank you for writing.

The RadGridView control includes FilterDescriptors property of the GridViewTemplate which is exposed in RadGridView class for the MasterTemplate instance. This collection stores filter descriptors used for filtering operation. The FilterDescriptor class implements filtering property (field) name, filtering operator and value, which is used to define simple filtering expressions. The Operator property allows you to define the type of operator. In your case, you can add "StartsWith" filter to a specific column by adding a FilterDescriptor:
this.radGridView1.EnableFiltering = true;
 
FilterDescriptor filterProductName = new FilterDescriptor();
filterProductName.PropertyName = "Phone";
filterProductName.Operator = FilterOperator.StartsWith;
filterProductName.Value = "M";
filterProductName.IsFilterEditor = true;
this.radGridView1.FilterDescriptors.Add(filterProductName);

In addition, you could read our documentation article about setting filters programmatically (simple descriptors): http://www.telerik.com/help/winforms/gridview-filtering-setting-filters-programmatically-simple-descriptors.html.

Attached you can find a sample project.

I hope this helps.

Regards,
Plamen
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Fadi
Top achievements
Rank 1
answered on 18 Jan 2013, 08:35 AM
Thanks Plamen for writing, but u seem like misunderstood me. What do i want is to search inside a GridViewComBoxColumn. Same as the below link image...
IMAGE
I did it but the fltering type is 'StartWith'
So i want to write inside this GridViewComboBoxColum and filter with 'Contains' not 'StartWith'
Thanks in advance.
0
Plamen
Telerik team
answered on 23 Jan 2013, 07:08 AM
Hello Fadi,

Thank you for writing.

In this case I can offer setting the DropDownStyle of the editor in the filter row to DropDown, so it will allow typing in it, add a FilterDescriptor for this column and then in the TextChanged of the same editor set the value the FilterDescriptor.

Attached you can find a sample application, which I hope will help you.

Kind regards,
Plamen
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
h
Top achievements
Rank 1
answered on 18 Nov 2017, 03:58 PM
Hi, what am I doing wrong, I just added that the control was editable, the problem I have is that when I open the options and start typing to filter, I get two filters, which do not filter at the same time, I would like only one to come out and be bigger than the column that has the ComboBox thanks in advance
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 21 Nov 2017, 10:33 AM
Hello, 

Thank you for writing.  

It is a known issue RadDropDownList. You can track its progress, subscribe for status changes and add your comments on the following link: https://feedback.telerik.com/Project/154/Feedback/Details/169297-fix-raddropdownlist-the-control-popup-is-not-closed-automatically-when-the-aut

Feel free to use the suggested solution in the feedback item to close the drop down when the autocomplete popup is shown.

I hope this information helps. Should you have further questions I would be glad to help.
 
Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Fadi
Top achievements
Rank 1
Answers by
Jeff
Top achievements
Rank 1
Fadi
Top achievements
Rank 1
Plamen
Telerik team
h
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or