Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
Currency formatting and sorting problem
posted

Hello all,

just starting out with the igGrid and I have a problem.

In my data model, I have two properties, "price" (decimal number) and "currency" (string). I would like to display them together in one single column, like so:

Price
100 EUR
20 USD

I also need to be able to numerically sort the values.

Problem is, if I concatenate the values into a single property before binding the data, number sorting does not work since it is then handled as a string (100 would appear before 20).

Since I have several different currencies in the data (EUR, USD...) I can not just always resort to the currency of the current locale (otherwise the "currency" format option would work).

The formatter function could possibly be an option, but I can't find a way to get the value from the other property to append it.

Parents
No Data
Reply Children