Flexgrid Filter window treats number as string

Posted by: mmurugesan on 7 March 2019, 2:17 pm EST

    • Post Options:
    • Link

    Posted 7 March 2019, 2:17 pm EST

    Hi,

    My Flexgrid Filter not displaying data in the correct order. My ID column is having integer data and the sorting functionality is working fine in the grid. But, while clicking on the filter icon, in the filter window it shows data in incorrect order which treats the numeric data as string type and shows as 1, 10, 100, 101… 2, 20, 201… It should be 1,2,3,4,5,6,7,8,9,10,11…

    Below is my TypeScript code:-

    const firstCol = { header: “ID”, binding: “@signalID”, minWidth: 50, dataType: wijmo.DataType.Number };

    this.signalGridColumns.push(firstCol);

    this.signalGridFilter = new wijmo.grid.filter.FlexGridFilter(this.signalGrid);

    Please advise on this.

  • Posted 7 March 2019, 2:18 pm EST - Updated 3 October 2022, 8:09 pm EST

    Here is my screenshot.

  • Posted 8 March 2019, 2:21 am EST

    Hi,

    Thank you for your query, I am unable to reproduce this issue. Could you please try try with this sample and let me know if you are still facing the same issues

    https://demos.wijmo.com/5/SampleExplorer/SampleExplorer/Sample/FlexGridFilter

  • Posted 8 March 2019, 10:12 am EST

    Ok… I got it… my data source for this ID column is string format like this. “1”, “2”, “3”,… I changed this to number format and it worked fine. I did this - val = Number(val);

    This solved my issue. Thank you abhishek for your response.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels