Hi Team
I am looking for very urgent quick help
i have columns applied currency format, is there any way to have one column with two decimal which is default but another column with three decimal and another with four decimal.
I understand that $.ig.regional.defaults i have to set min/max value for currency, suppose i set min to 0 and max to 9 and but how can we set dynamically column decimal value to according to my need for each column.
How can I achieve that.
I felt $.ig.formatter this can help me but didn't understand this function completely, since its not mentioned any documentation can you help me to understand this function.
I tried this but didn't worked $.ig.formatter(9332.44567889, "number", "currency",null,null,'0.00')
Your ASAP response will be very helpful for me.
Thanks
Hi Vasya
i tried your solution its work but what about currency formatting for example if i use formatter i loose the thousand separator formatting, also i want to ask how localization we can managed here.
Thank you for response and help.
I understand regarding your supportlevel point but i started this thread on 28 September my local time and today is 1st October, my client deliverable was getting delayed.
any way this helps me thanks for help if any doubt will post you.
Thank you
Hello ptilwani,
Thank you for posting in our community.
As you assumed formatter function will help you achieve your requirement. As mentioned in our API documentation formatter is a reference to a function(string or function) which will be used for formatting the cell values of particular column. The function should accept value and return new formatted value.
I made a small sample illustrating how your requirement could be achieved using formatter option of the columns. Since formatter is set per column you can format every column differently and get the look and feel that you are looking form. In my sample I am using 3 formatter to return the values with 2,3 and 4 decimal placed. In this scenario data type number is preserved and sorting and filtering behavior are working as expected for this type of data For example:
[code]
$("#grid").igGrid({ columns: [ { headerText: "Name", key: "Name", dataType: "string" }, { headerText: "Age", key: "Age", dataType: "number" }, { headerText: "Price1", key: "Price1", dataType: "number", formatter: function (val, data) { return "$" + val.toFixed(2) } }, { headerText: "Price2", key: "Price2", dataType: "number", formatter: function (val, data) { return "$" + val.toFixed(3) } }, { headerText: "Price3", key: "Price3", dataType: "number", formatter: function (val, data) { return "$" + val.toFixed(4) } } ], dataSource: data //JSON Array defined above });
[/code]
I am also attaching my sample for your reference.
Please keep in mind that according to our Support Policy the response time for your cases and forum posts depends on the support level that you have. In you scenario the support level is "Standard" which means that the actual response is expected within 3 business days. If you would like to take advantage of our Priority support and receive responses with 24 ours please contact our sales department at: sales@infragistics.com
Thank you for using Infragistics components.
HI Team
Its very disappointing. I am using your licensed version and hence expecting a response from you ASAP. i have some client deliverable which is getting delayed because i am not getting any response from Team.
It will be very help full you Response on this ASAP.
please some one suggest me....