I am trying to get the autosize columns action working properly. I have applied the (extension) client action into the OnInitialize of the datagrid.
I checked if the version is correct and the applied JS is correct and I think it is.
But it does not work. Another client action, for example AddGroup works just fine. What am I doing wrong?
Hi @Rogier Mullaart
I tried something I already shared on another similar post and it works as expected. The only difference is the argument being passed.
In the Grid OnInitialize event, add a JavaScript node with the following script:
OutSystems.GridAPI.GridManager.GetGridById($parameters.GridWidgetId).provider.autoSizeColumns(0);
In these cases please always share the OS Data Grid version and a sample oml for efficiency's sake.Hope it helps.
Best Regards,GM
Hi GM,
Thank you for your help and tips. I applied your solution and sadly it does not seem to be the solution. I can not upload the OML since it is more then 10 MB. Instead I copied the webblock and added this to a new module and saved it as OML. You will see a lot of errors (beacuse the rest of the application is missing) but you can check my implementation.
The OS Data Grid version is Version 2.12.1
I can't see any attachment.Also, can you please elaborate on what's not working? I just ran a test with the latest version (please validate on the release notes if there's something related to your "issue") on my Personal Env and the auto-size on the columns is working just fine.
Cheers,GM