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

RadGridView Filter - 'Contains' option required on numeric column

4 Answers 131 Views
GridView
This is a migrated thread and some comments may be shown as answers.
brendan
Top achievements
Rank 1
brendan asked on 04 Feb 2011, 10:44 AM

Hi
Is there any way that I can override the default RadGridView Filter behaviour where the 'Contains' option is not presented for numeric fields?
I need the 'Contains' option to appear on a numeric column. I know that I could change the datatype on the table but that's not really an option for me.
I am a licensed user of RadControls for WinForms Q1 2010 SP2.
Any help is appreciated.
Thanks

4 Answers, 1 is accepted

Sort by
0
brendan
Top achievements
Rank 1
answered on 08 Feb 2011, 12:46 PM
Hello Telerik Team
Can I please get some response on this?
Brendan
0
Richard Slade
Top achievements
Rank 2
answered on 08 Feb 2011, 01:03 PM
Hello,

As far as I'm aware, the integer column type cannot use a contains filter.
I am running the latest version of the controls, but I think you could do something like this.
First, change the column to be a GridViewTextBoxColumn, so that you get the Contains filter that you need. then change the editor element by following this documentation so that you always display a spin editor to ensure that you input only integer values.
Hope that helps, but let me know if you need further help
Richard
0
brendan
Top achievements
Rank 1
answered on 08 Feb 2011, 06:35 PM
Thanks for the reply Richard.
I'll try that and let you know how I got on.
0
Svett
Telerik team
answered on 09 Feb 2011, 09:13 PM
Hi brendan,

You can achieve that by creating a custom filtering predicate. I have attached a sample project that demonstrates how you can achieve this scenario. If you have any further questions, do not hesitate to contact me.

Greetings,
Svett
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
Tags
GridView
Asked by
brendan
Top achievements
Rank 1
Answers by
brendan
Top achievements
Rank 1
Richard Slade
Top achievements
Rank 2
Svett
Telerik team
Share this question
or