Premium support for our pure JavaScript UI components


Post by empire »

Please provide example code to configure the ResourceGrid costs fields (see attachment)

  1. StartDate Format
  2. Standard Rate Currency (to Australian)

Is possible to set default date format and currency for the entire Gantt?

Also, please provide sample code to change the Resource Name from textbox to combobox.

Thanks.

Attachments
Untitled.png
Untitled.png (25.04 KiB) Viewed 5557 times

Post by alex.l »

Hi,

Currency, number and date format managed by localization.
Please see the guide here https://bryntum.com/products/gantt/docs/guide/Gantt/customization/localization#the-structure-of-a-locale

Also, please provide sample code to change the Resource Name from textbox to combobox.

How to customize TaskEditor is described here https://bryntum.com/products/gantt/docs/api/Gantt/widget/TaskEditor
What example you used to make this screenshot? I could make a config sample.

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy


Post by empire »

Hi.

Your response was not helpful.

Firstly, I can look in the online help. I submitted a support request because the online help is not detailed enough to provide a solution.

Secondly, my questions are referring to the Resource Grid (an not the Task Editor).

Please provide sample code to initialise the Resource Grid to answer my questions above.


Post by Animal »

I think we need an EnAu locale so that you guys can use your own preferred date format (and possibly other terms), and not rely on the default En (USA) or EnGb locales.

Also, the CurrencyColumn's default should be taken from the loaded locale, not hardcoded as USD.

https://github.com/bryntum/support/issues/12964


Post by alex.l »

Hi empire,

Sorry for not helpful response. TaskEditor also has ResourceGrid and from the screenshot it was not clear to me where exactly it's placed.

Firstly, I can look in the online help. I submitted a support request because the online help is not detailed enough to provide a solution.

For sure, in case of ResourceGrid you meant, we have to fix some problems to make it managable.

To learn how to setup currency in the column you can check online code editor of this demo https://bryntum.com/products/gantt/examples/advanced/

and add https://bryntum.com/products/gantt/docs/api/Grid/column/CurrencyColumn#config-currency
As on this code snippet

// Let toolbars know of other view references
Object.defineProperty(gantt.tbar, 'resourceGrid', {
    get() {
        if (!resourceGrid) {
            resourceGrid = new ResourceGrid({
                appendTo          : 'container',
                // resource grid is hidden initially
                hidden            : true,
                project,
                resourceImagePath : '../_shared/images/transparent-users/',
                columns           : {
                    data : {
                        // override default cost column
                        cost : {
                            // rollup cost to the groups
                            sum : 'sum',
                            currency : 'EUR' // <<<<<<<<<<<<< for example, I do not know what is Australian rate currency, just set as you need 
                        },

Date format might be set in a same manner
Columns are listed in ResourceGrid docs https://bryntum.com/products/gantt/docs/api/SchedulerPro/view/ResourceGrid
How to set format is described in DateColumn docs here https://bryntum.com/products/gantt/docs/api/Grid/column/DateColumn

All the best,
Alex Lazarev

How to ask for help? Please read our Support Policy


Post Reply