Implementazione della Persistance Storage



1. Per poter mantenere le modifiche delle colonne in una Grid è necessario aggiungere nella Grid in questione:

 

protected getPersistanceStorage(): Serenity.SettingStorage {
            return new Common.UserPreferenceStorage();
        }

 

 

2. Per poter tornare al layout predefinito è necessario aggiungere nella funzione getButtons della Grid:

 

buttons.push({
                title: 'Layout Predefinito',
                separator: true,
                cssClass: 'back-button',
                onClick: () => {
                    var name = "GridSettings:Default/Ticket:PHSYS.Default.TicketGrid"
                    var link = "Default~Ticket";
                    location.href = "/Default/RestoreDefault?name=" + name + "&link=" + link;
                }
            });

 

è necessario modificare eventuali link di riferimento alla Grid.