Wijmo5 Flexgrid column sorting for alphanumeric value

Posted by: rambabu on 14 September 2017, 11:44 am EST

    • Post Options:
    • Link

    Posted 14 September 2017, 11:44 am EST

    Hello,

    I have an issue with sorting in wijmo Flexgrid.

    I have aplhanumeric values in a column and when i click on its header for sorting, the values which are aplhanumeric are not sorting properly.

    For example,

    consider this list : A1203,1110,A100,230

    If i click on header to sort it should sort like A100,A1203,230,1110, instead it sorting is like A1203,A100,230,1110.

    Could you please provide a solution for sorting for alphanumeric numbers.The fiddle link for it is http://fiddle.jshell.net/Teja_Gudivada/mjdxkztf/.

    Thanks & Regards

  • Posted 14 September 2017, 11:44 am EST

    Hello Rambabu,

    You can sort alphanumeric values using sort comparer method of collection view with Dave Koele’s Alphanum algorithm. This will sort all the values alphanumerically.

    For reference, kindly see the updated fiddle http://fiddle.jshell.net/mkgupta911/mjdxkztf/1/, which implements the same.

    Hope this will help you.

    Thanks,

    Manish Kumar Gupta

  • Posted 14 September 2017, 11:44 am EST

    Thanks Manish Kumar Gupta for you response,it is really helpful.

    Thanks & Regards

  • Posted 9 March 2022, 1:53 pm EST

    Hello Manish. Can u please share the fiddler again? I also need similar behavior. thanks.

  • Posted 10 March 2022, 5:40 am EST

    Hello,

    You may refer to the sample link below demonstrating the same:

    https://stackblitz.com/edit/angular-efmzbr?file=src%2Fapp%2Fapp.component.ts

    You can update the custom function(compareFn) used to compare values as per your requirement.

    Regards

Need extra support?

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

Learn More

Forum Channels