Hi everyone,
I want to remove the column picker column, whilst keeping the checkbox column (see image bellow).
I tried to customize the headersVisibility but when I change from headersVisibility: wijmo.grid.HeadersVisibility.All to headersVisibility: wijmo.grid.HeadersVisibility.Column, both columns (the picker column and the checkbox column) disappear .
Thanks for the help
Hi @Constança Branco,
Thank you for reach us with this question. This is a default behavior we are offering, by now I don't know how difficult is to work-around this, however I want you to know, that we are looking into this to try to unblock you as soon as possible.
I'll reach you out, when I have more info, sorry for the waiting.
Hi Constança Branco,
One of the approaches for your use case is to set headersVisibility value to 1
JS Snippet:
Traditional Web:
document.onreadystatechange = function () { if (document.readyState == "complete") { setHeadersVisibility(1); } } function setHeadersVisibility(n) { GridOS.GridObject[0].grid.headersVisibility = n; }
Demo Screen: DG_HideRowHeaders
Reactive Web:
GridAPI.GridManager.GetGridById($parameters.GridWidgetId)._provider.headersVisibility = 1;
I hope this helps you!
Kind regards,
Benjith Sam
Hi Benjith,
Thank you for the reply.This indeed hides the column picker but it will also hide the column checker. I need to keep the column checker and only hide the first column.
Hi @Constança Branco
For OutSystems Data Grid Web you have a simpler way by using the Advanced Format:
Since you'll be manipulating Wijmo's properties you can find in the documentation all the values that are available (and possible) on the library by looking at this enumerator - HeadersVisibility
Cheers,GM
@Constança Branco Unfortunately I couldn't find a way to do it. I haven't found any wijmo example without column filter.
Hi Gonçalo,As I explain above, if I change the header visibility to from All to Column it will hide both columns (the picker column and the checkbox column).What I want is to keep visible the checkbox column (highlighted in yellow bellow) and delete the column picker (highlighted in red).
When I change the header visibility to Column it will hide both, like demonstrated below:
Hi JoĂ£o,
Yeah I also took a look at wijmo's library and didn't find any info on this. I was hoping to find a way of overwriting the constructor of the row headers, but no luck so far.
Sorry I was not clear. I was not providing a solution, just a cleaner alternative for the approach Benjith Sam gave and pointed you to all the options available.
Hi again @Constança Branco
After doing more research I found together with JoĂ£o this example on Wijmo's side.
As far as I was able to understand, the only way to achieve this is by using the wijmo.grid.selector which is not available on the Traditional web and we don't plan to evolve it in this direction. If you can find a way to include it you could have something like the following snippet (couldn't test it), but with the current version this doesn't seem to be possible, you need to have a custom version to do it I would say:
document.onreadystatechange = function () { if (document.readyState == "complete") { let theGrid = GridOS.GridObject[0].grid; setHeadersVisibility(theGrid); } } function setHeadersVisibility(grid) { let selector = new wijmo.grid.selector(grid); grid.headersVisibility = wijmo.grid.HeadersVisibility.All; selector.column = theGrid.rowHeaders.columns[0]; }
Sorry for not being able to unblock this use case. If you're able to solve this please share it with the community, maybe someone in the future will have the same needs.
Is there a way to make this work in the reactive version?
Hi @AndreRocha,
Please check the answer for this question here.
Cheers,
Giuliana.