[Data Grid Web] Save Configs
Forge component by OutSystems R&D

Hi guys. Couple questions about saving. First I noticed saving keeps most of the configuration like column selection, sizing , order etc. However it doesn't seem to save any filter information. Is there some way I can turn that on or add it?

Second , is there any way to save more than one config per user ? Thanks for any extra info you can provide.

Anyone ? Is it possible to save the filters with the configuration ?

Hi Mark,

Filters should be stored as part of the configuration. I've already tested it, and, as you described, it's not working. It's a bug and I'll report it to the team. Thanks for the heads up.

Still on the configurations, they store per screen, user id and grid id. So, it's not possible, for the same grid, to have different user configurations. Can you give me an example of where you'd use such a feature?


Ricardo Alves

Hi Ricardo. My scenario is a report with a lot of columns , over 100. Users will use it as an ad hoc reporting tool. So it would be nice to save multiple configurations that they can just load when they come back at a later date.The users will be from many different areas of the company and have different needs.

I forked the component and customized it to achieve this. Basically I just added config name and description to the entity, then added a gridConfigId/name/desc parameters to rest service, server action , and the save and load web blocks. Then added it to the saveConfig and resetConfig javascript functions. Would love to see something like this become part of the standard component.

Then I made kind of starter template with just a few columns in the config. It loads by default. Users can add columns etc.and save their own. Then they can choose from their own list of configs when returning.

Of course I didn't want to fork it. And now I'll have more work when the filter configurations get fixed :(

Hi Mark,

I've had a similar need and did the exact same thing you're talking about.  My question to you is, how do you load the configuration?

I can save the configurations out fine, even multiple per user, reset/delete them just fine.  I provide a dropdown that shows the configurations for the user for the specific grid, and on change of that dropdown I run some javascript code that is just calling the "GridOS.ComponentUtils.loadConfig(<params here>)" function.  Is there something else you have to do?


I believe I got it working as I'd expect.  I originally wasn't passing in a callback function to the loadConfig function;  I was setting it to null.  I changed my params to include a callback function based off the REST URL and it's updating my GridContainer as I'd expect.

Essentially now all I have is a dropdown that shows the list of saved configurations for the user for the specific grid.  When they change that, the screen action is called and I use the RunJavaScript action to run:

var loadCallback = function () {
    GridOS.DataFeature.getGridData('" + EncodeJavaScript(RestURL) + "', '" + EncodeJavaScript(Grid.Id) + "');
GridOS.ComponentUtils.loadConfig('" + EncodeJavaScript(Grid.Id) + "', loadCallback, '" + EncodeJavaScript(ApplicationId) + "', '" + EncodeJavaScript(GetGridConfiguration.List.Current.GridConfigurations.Name) + "');"
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.