Can I Apply cast datatype for Filter!
Hi,
As far as I remember, when using the columns.filter function, if the data types are not identical (for example the column has concurrent strings and numbers) then the filter will fail because in each code only one strongtype or StringTyped is allowed.
Is it possible to cast these data types to ignore the error?
column example
1
2
3
a
b
5
.FilterPredicates.Add (New FilterPredicate () With {
.FilterBehavior = ftbehav,
.FilterType = FilterType.greater,
.FilterValue = 2})
how to select filterbehavior to get result:
3
5
SIGN IN To post a reply.
5 Replies
VS
Vijayarasan Sivanandham
Syncfusion Team
September 22, 2020 03:31 AM UTC
Hi Khanh Dang,
Thank you for contacting Syncfusion support.
Based on provided information in your filter predicates contains the FilterType as Greaterthan in mentioned column does not apply the greater than in string type value. In this case not applied in the filter row.
Please let us know, if you require further assistance on this.
Regards,
Vijayarasan S
Thank you for contacting Syncfusion support.
Based on provided information in your filter predicates contains the FilterType as Greaterthan in mentioned column does not apply the greater than in string type value. In this case not applied in the filter row.
Please let us know, if you require further assistance on this.
Regards,
Vijayarasan S
TG
The GridLock
September 22, 2020 02:03 PM UTC
Hi Vijayarasan ,
I mean, the current filter will only allow us to do filtering on columns of the same data type.
Will you expand this functionality in the future? the filter function will check the types first and return the results after being cast though it may be slower but safer and easier to use
VS
Vijayarasan Sivanandham
Syncfusion Team
September 23, 2020 10:18 AM UTC
Hi Khanh Dang,
Thanks for the update.
We also regret to inform you that currently, Our SfDatagrid source architecture does not provide support to achieve your requirement of “the filter function will check the types first and return the results after being cast in SfDataGrid”.
Thanks for the update.
We also regret to inform you that currently, Our SfDatagrid source architecture does not provide support to achieve your requirement of “the filter function will check the types first and return the results after being cast in SfDataGrid”.
Regards,
Vijayarasan S
Vijayarasan S
TG
The GridLock
September 23, 2020 03:05 PM UTC
Ok Vijayarasan!
VS
Vijayarasan Sivanandham
Syncfusion Team
September 24, 2020 04:50 AM UTC
Hi Khanh Dang,
Thanks for the update.
Please let us know if you have any further queries on this. We are happy to help you😊.
Regards,
Vijayarasan S
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
TG The GridLock
- Sep 18, 2020 06:47 AM UTC
- Sep 24, 2020 04:50 AM UTC