Change Wijmo flexsheet column dataType

Posted by: teenu.k on 2 July 2020, 6:39 pm EST

  • Posted 2 July 2020, 6:39 pm EST

    Hi All

    I am using wijmo flexsheet, and getting some column data as string. I need numeric filter conditions (greater than ,less than,…) in the in filter by condition for those columns. Since it’s datatype is String , currently it is not coming. I have set the datatype for those columns as Number by looping the data. But that is affecting the whole columns. I want to set datatype as Numeric for specific columns only. Is there any way to do that?

    Thanks in advance.

  • Posted 5 July 2020, 10:32 pm EST

    Hello Teenu,

    You may customize the Filter operators as per your need for each data type. In case you would like to change the filter operators for all string data type column, please refer to the following demo sample:

    http://jsfiddle.net/mkgupta911/1cj2hwgz/1/

    Regards,

    Manish Gupta

  • Posted 7 July 2020, 12:09 am EST

    I have four currency columns and it is coming as String from API . So it is showing filter conditions for String in those columns. I changed the datatype of that particular columns as

    e.panel.columns[e.col].dataType = wjcCore.DataType.Number;

    Now the I could see the filter conditions for Number, but the thing is that this filter conditions are not working. Is there any way to resolve this? Please help…

  • Posted 7 July 2020, 6:19 pm EST

    Hi Teenu,

    As per the provided code line, it seems you are setting the column dataType in the FormatItem event.

    Please try to set using the following code snippet:

    flexSheet.getColumn("sales").dataType=wijmo.DataType.Number;
    

    Also, refer to the demo fiddle for reference:

    http://jsfiddle.net/mkgupta911/1cj2hwgz/4/

    Hope it helps!

    If the issue persists, please share the demo sample depicting your issue or share some demo data.

    Regards,

    Manish Gupta

Need extra support?

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

Learn More

Forum Channels