You can localize the display of numbers, dates, and currency values within the grid by providing a locale identifier and options, compliant to the Intl (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl) object specification, to the format property of the column metaData.
JavaScript Copy Code |
---|
grid.model.columnMetaData(3).set("format", { |
By default, the inplace editors, provided by the grid control for the Date, DateTime and Image type columns are:
You can replace the default editors with a corresponging control from the MindFusion.Common.UI library (DateTimePicker for Date and DateTime and ImagePicker for Image) by setting the "customEditor" property in the column metaData. The value of the "customEditor" property should be a dictionary of property names and values, that you wish to set for the control, as specified by its API.
To localize the DateTimePicker you should set its "locale" property to an instance of the MindFusion.Common.Locale class. The Locale class provides culture-specific information, that can be loaded from a CLDR dates json file.
JavaScript Copy Code |
---|
// set MindFusion.Common.UI.DateTimePicker as an inplace editor for the column and configure it var url = 'https://unpkg.com/cldr-dates-full/main/de/ca-gregorian.json'; fetch(url) grid.model.columnMetaData(1).set("customEditor", { grid.refresh(); |