Posted 4 May 2021, 12:07 am EST
Hi Ashwin,
Thank you for your answer. That’s not exactly what I was looking for. I was not clear enough.
Let’s say in my case, I already have have the grid definition such as:
const collectionView = new CollectionView([]);
const grid = new FlexGrid("#theGrid", {
itemsSource: collectionView,
columns: [{
name: 'country',
binding: 'country',
}, {
name: 'downloads',
binding: 'downloads',
}, {
name: 'sales',
binding: 'sales',
}, {
name: 'numbers',
binding: 'numbers',
format: 'D',
}],
});
As you can see, except the ‘country’ column, I have 3 columns with explicit dataType number. However, the initial data is empty (dataType will not be detected at the creation time), and data will be added later to the collectionView.
What I want to achieve is: I want the default format for number (columns ‘downloads’ and ‘sales’) would be ‘f’, and the column ‘numbers’ format will be ‘D’ as specified.