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

Filter not working properly for the column having decimal values

8 Answers 797 Views
Grid
This is a migrated thread and some comments may be shown as answers.
vinoth sansar
Top achievements
Rank 2
vinoth sansar asked on 13 Aug 2010, 11:55 AM
Hi...
I am having a radgrid with a column containing decimal values(ex:2.3,3.4,1.2,3.0).If i give for example 3 or 3.0 for filtering i am not getting the result.Please provide me with a solution.

8 Answers, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 16 Aug 2010, 09:01 AM
Hello,

Can you reproduce the problem with this online example? It seems to be working as expected on my end.

Regards,
Pavel
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
0
vinoth sansar
Top achievements
Rank 2
answered on 20 Aug 2010, 12:24 PM
thanks for reply. its working properly now
0
Bruno Carlos
Top achievements
Rank 1
answered on 09 Sep 2010, 04:01 PM
Hello

I have a similar problem, the difference is that my decimal char is a comma "," instead of point "."
In the grid the values are represented correctly with comma and if i use point in the filter box it works ok , but if i use comma dont work. I use a different culture <globalization culture="pt-PT" uiCulture="pt-PT" />.

any tip?

tanks in advance
0
Pavel
Telerik team
answered on 10 Sep 2010, 07:25 AM
Hello Joao,

I am not sure what may be causing the problem on your end however I have tested a simple scenario with the specified culture which seems to be working as expected on my end. You can find the page attached to this message. Please try it out and let me know what is needed to replicate the issue with it.

Regards,
Pavel
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
0
Bruno Carlos
Top achievements
Rank 1
answered on 10 Sep 2010, 10:43 AM
hello

Tanks for the answer.
I discovered that:
- if the database field (sqlserver) is a real , grid create a system.simple column type. Don't work
- if the database field (sqlserver) is a float, grid create a system.double column type. Work well

0
Pavel
Telerik team
answered on 13 Sep 2010, 07:46 AM
Hello Joao,

I have changed the type of the Freight field in the Orders table in the Northwind database to real, however the filtering is still working as expected on my end. Can you confirm you can reproduce this if you change the type of the field in the attached sample?

Regards,
Pavel
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
0
Bruno Carlos
Top achievements
Rank 1
answered on 13 Sep 2010, 01:44 PM
hello

I already saw your exemple, there is a big diference. I use autogenerated columns, in your exemple you create a column that cast the database value, with autogenerated it creat a type of column related with database column type as i said in last mensage.

thanks
0
Pavel
Telerik team
answered on 14 Sep 2010, 09:24 AM
Hello Joao,

Indeed you are correct. When the data type in the database is 'real' if you use autogenerated columns, the created column is of type GridBoundColumn which prevents the correct parsing of the value. However if the type is decimal or float the column is GridNumericColumn and the scenario is working as expected.
 
To make the scenario work you can either change the type of the field in the database to 'decimal' or 'float' in which case a numeric column will be generated. Another option is to define a numeric column for that field.

Please excuse us if this limitation causes you any inconvenience.

Greetings,
Pavel
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
vinoth sansar
Top achievements
Rank 2
Answers by
Pavel
Telerik team
vinoth sansar
Top achievements
Rank 2
Bruno Carlos
Top achievements
Rank 1
Share this question
or