setNumberFormat not working correctly

I have the following code snippet:

grdExchratehist.setNumberFormat("0,000.0000",5,".",",")

This produces the following results:

Value : 300.5 Format : 300.5 Expected : 300.5000
Value : 300 Format : 300.0 Expected : 300.0000
Value : 300.12 Format : 300.12 Expected : 300.1200
Value : 300.123 Format : 300.123 Expected : 300.1230

Currently if some items in column have more decimal places than others then the decimal places do not align. I have got the setColAlign to ‘right’ for that column.

Please can you tell me what I am doing wrong.

Thanks

Please ignore this problem. It was my fault. I had the column set as ‘ro’ rather than ‘ron’.

Sorry to have wasted your time.