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

Filter for number in radmulticolumn

1 Answer 71 Views
MultiColumn ComboBox
This is a migrated thread and some comments may be shown as answers.
Saeed
Top achievements
Rank 1
Saeed asked on 28 Jan 2013, 05:26 AM
Hi
I have a problem in filter of radmulticolumnCombobox .
when i used this code for filter in radmulticolumn ، I have a error (invalid expression filter ).

MulCmb.EditorControl.FilterDescriptors.Add(Id, FilterOperator.StartsWith, 0);
But if i uesed this code ، i don't have problem .

MulCmb.EditorControl.FilterDescriptors.Add(Id, FilterOperator.IsGreaterThanOrEqualTo, 0);

But I must used FilterOperator.StartsWith.
How can i fix this problem?
Could you help me?

 

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 29 Jan 2013, 03:14 PM
Hi Saeed,

Thank you for writing.

The observed behavior is expected because one cannot operate a StartsWith operation of type int. This type of operation is for strings only.

You could try using custom filtering where you can handle this case as you with. Please read our documentation article about custom filtering: http://www.telerik.com/help/winforms/gridview-filtering-custom-filtering.html. Note that, custom filtering has a higher priority than the applied FilterDescriptors (added either by code or using the filtering row).

Be aware that the filtering operation in RadMultiColumnComboBox is controlled by the boolean AutoFilter property and the data is filtered by the field specified as DisplayMember. In addition, you need to add a FilterDescriptor to enable the filtering operation via the editable area of the control.

Find attached a sample project, which implements custom filtering on RadMultiColumnComboBox control.

I hope this helps. If you have additional questions, do not hesitate to ask.

Regards,
Plamen
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
MultiColumn ComboBox
Asked by
Saeed
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or