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
igpivotgrid format data
posted

Hi,

how can I format a dimension (datetime) in pivot grid?

I tried with this but it doesn't work:

//memberProvider: function (item) { return item.date; }
memberProvider: function (item) { return $.formatNumber(item.date, { format: "dd/MM/yyyy" }); }

Parents
No Data
Reply
  • 29417
    Offline posted

    Hello Giovanni, 

    Thank you for posting in our forum. 

    What type is the value that you are trying to format? 

    Ignite UI has a $.ig.formatter function that you can use to format your values:

    https://github.com/IgniteUI/ignite-ui/blob/master/src/js/modules/infragistics.util.jquery.js#L624

     You can use it by providing the value, the value type (date, number etc.) and the format.

    For example, if you are aiming to format a value of type date the code would look as follows:

    $.ig.formatter(dateValue, "date", "dd/MM/yyyy") 

    I hope you’ll find this information useful. I’m looking forward to your reply.

Children