Can i show 00001 in NumerCellTpye

Posted by: kotaro-fp on 8 September 2017, 1:19 pm EST

  • Posted 8 September 2017, 1:19 pm EST

    i want to show dataId as 00001 in NemberCellTpye


    because i  want to sort this column as Nember


    example


    before sort


    00021


    1


    0222


    12


    After sort


    1


    12


    00021


    0222


    How should I do?

  • Replied 8 September 2017, 1:19 pm EST

    Hello,


    Our NumberCellType does not support displaying numbers like you want. You can either create a custom celltype that inherits from NumberCellType and overrides the PaintCell method to paint the text as you want. Or you can use the TextCellType and then you would need to code your own IComparer interface code to pass into the sort to sort the data as numbers and not strings.

  • Replied 8 September 2017, 1:19 pm EST

    You can also look at this thread that addresses the same issue...

    http://www.clubfarpoint.com/Forums/forums/thread/38856.aspx

Need extra support?

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

Learn More

Forum Channels