I'm using Vue data grid and I have some string and number columns. I have define column type and my data is showing perfectly. My problem is when I search in filter bar for the columns with number data type, it's not working. I have found that the default filter operator is Equal and it is not working for number data types, but when I tried Greater Than and Equal or Less Than and Equal, they worked ok. Please kindly help me with my issue and tell me if you need any sample code.
PSPavithra Subramaniyam Syncfusion Team November 4, 2019 11:49 PM
Greetings from Syncfusion.
I've found my problem. Filter bar is not working when my data type is decimal (in mysql), but it works good with integer and double data types.
how can I make it work with decimal data type?
PSPavithra Subramaniyam Syncfusion Team November 11, 2019 05:42 AM
Thanks for sharing the details.
We checked your query with provided code snippet but unfortunately were not able to reproduce it. You have mentioned that the filter bar is not working when having decimal values in the column but on checking it was working fine in our end. Please find the sample based on your provided code for reference from below,
Can you please let us know the Syncfusion package version that you are using in your application and if any console errors are getting thrown while filtering. It would also be helpful for us to identify your issue better if you could provide us a simple working sample for reproducing the issue or if possible try to reproduce it in the above provided sample so that we can check and provide you the proper solution for it.
PSPavithra Subramaniyam Syncfusion Team November 13, 2019 07:22 AM
In the provided sample application you have given the credit_amount and debit_amount field values as string type in the data source. But in the column you have mentioned the type as number. This is the root cause for your issue. You can resolve this by either giving the type as string for these columns or parse these column values into number before assigning it to the grid.
We have modified the sample by giving the column type as string based on the data source field value. You can find it below,