How can i change change the currency symbol position in column

How can i change change the currency symbol position in column

canparlarcanparlar Posts: 1Questions: 1Answers: 0

I have TotalPrice and currency symbol in my datatable. I am using renderer in totalPrice data. But i couldn't change currency position. I want to show currency symbol at the end of the TotalPrice Data.

https://datatables.net/forums/discussion/29604/how-to-get-the-currency-symbol-at-the-end-of-the-number
I examined this link but i couldn't do it.

My datatable constructor is;

"columns": [
{ "data": "OrderId", "name": "OrderId", "width": "20%" },
{ "data": "CustomerName", "name": "CustomerName", "width": "40%" },

                    { "data": "TotalPrice", "name": "TotalPrice", "width": "20%", render: $.fn.dataTable.render.number('.', ',', 2,'TL')},
                    { "data": "StatusCode", "name": "StatusCode", "width": "20%" },

This code shows my data with TL5000 what I want to do is 5000 TL

I would be very happy if you support.

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,599

    Try:

    render: $.fn.dataTable.render.number('.', ',', 2,'', ' TL')},
    

    If that doesn't help, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

This discussion has been closed.