jQuery UI Widgets Forums Grid JqxGrid sorting and filtering of column with alphanumeric data

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 9 years, 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • rani
    Participant

    Hello,

    I am using jqxgrid in my application and currently facing one issue regarding sorting and filtering of column which has alphanumeric data.
    The details are given below.
    I have a column ‘Size’ in my Grid and displaying data like below.
    Data:
    5.43 MB
    3.75 KB
    3.94 MB
    10.22 GB
    1.31 MB
    and I am applying Sorting and Filtering on ‘Size’ column. I have taken data type as ‘number’. Initially I am taking binary data in ‘number’ and I am using ‘cellsrenderer: bytesRenderer’ method for rendering data like above i.e. 5.43 KB ( against binary data – 5693767.68).

    Sorting is working fine but facing issue with filtering as it contains alphanumeric data. And it is considering numbers only and but not MB,KB,GB while filtering.

    Hence, filtering is not working as per our requirement.

    I request you to provide me any solution to solve this issue as i am unable to solve.


    Dimitar
    Participant

    Hello rani,

    An approach you can try is loading the data as, e.g. ‘5.43 KB’ (string), in which case the filtering will work as expected, and create your own custom sorting function.

    If you cannot change the format of the data that comes from the data source, you can use the data adapter’s beforeLoadComplete callback function to override it.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.