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

Filter Expression

4 Answers 116 Views
Filter
This is a migrated thread and some comments may be shown as answers.
priya
Top achievements
Rank 1
priya asked on 13 Aug 2014, 04:35 AM
i am using 2013.3.1114.35  telerik version .  AllowFilteringByColumn="True" Means It allow value to filter in Radgrid for a column .

In  my  radgrid contains Name ,Dept Column with many rows .If i want to filter the particular Name in grid So i enter as Text  eg: '      Hema' and select startwith  (because this only save in my table)  to filter particular name .
but when i using  rdGrdReport.MasterTableView.FilterExpression  means it allowslike this           (name Lilke 'Hema%')  to back End so i not able to filter the value.

Issues is when we using Filter expression  with  [allow space before value to '    Hema' search in filter text box means it consider like 'Hema%'   ].not taking space before the value.

4 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 15 Aug 2014, 03:17 PM
Hello,

After some testing I may confirm the behavior that you are describing and it seems that the same trimming could be replicated with other filter functions as well.

Since currently I am not able to elaborate if this is made that way by design or if it is a bug (or limitation). I will have to contact our developers team and get back to you with additional information on this query.



Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Konstantin Dikov
Telerik team
answered on 18 Aug 2014, 11:14 AM
Hello again,

After consulting with our developers team, with the current filtering implementation it would not be possible to have a workaround, which could allow the persisting of white spaces at the begging and at the end of the input, but I have created an item in our Ideas & Feedback Portal for exposing a property to RadGrid, which could enable such behavior. 

You could follow the progress of the item in the following link:
Please excuse us for any inconvenience caused by this.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
G
Top achievements
Rank 1
answered on 04 Sep 2014, 07:23 AM
I have used AllowFilteringByColumn in the radgrid and the normal filtering is working ok. Now, one of the column of the grid is FirstName and the data type is string and normal filtering is working. When a firstname contains Leading Space and the filter criteria is 'Equal To' then no result shows  but when the criteria is 'contains' then it shows result. I want to show the show the 'Equal To' criteria result also.
So, how to handle leading space in the filter criteria is 'Equal To'.
Pl, help.
Thanks,
G.Sen


0
Konstantin Dikov
Telerik team
answered on 08 Sep 2014, 01:36 PM
Hello,

Generally, non of the filter functions should return any results when you have leading spaces. The leading spaces should be part of the expression, so one should expect not to get any results. 

Nevertheless, with our current implementation for the Contains filter function, the searched string is trimmed and that is the reason for getting results with that function, but it is debatable if this is correct behavior or not.

As for your current scenario, the only things that I could suggest is that you trim your leading spaces from your database, inform the user that a leading spaces must be included when using EqualTo or to remove EqualTo from your filter options and leave only Contains.

Hope this helps.


Regards,
Konstantin Dikov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Filter
Asked by
priya
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
G
Top achievements
Rank 1
Share this question
or