95
Views
4
Comments
Solved
[OutSystems Data Grid] [Outsystems Data Grid] Removing RowHeader but keeping checkbox?
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive
Service Studio Version
11.53.33 (Build 61790)
Platform Version
11.18.1 (Build 37828)

Hey everyone.
I've been trying to remove the column picker column but keep the checkbox column in my data grid.
I tried the provider js functions and attributes but with no success. 

From looking at wijmo documentation I saw some examples where this is the case so I think this must be possible, can someone help?

2022-07-19 16-56-14
Giuliana Silva
Staff
Solution

Hi @AndreRocha,


In order to achieve this behaviour in DataGrid Reactive, add a Client Action to the OnInitialize DataGrid event with a JS Node containing the following code:


const grid = GridAPI.GridManager.GetGridById($parameters.GridWidgetId);

let selector = new wijmo.grid.selector.Selector(grid);

grid.provider.headersVisibility = wijmo.grid.HeadersVisibility.All;

selector.column = grid.provider.rowHeaders.columns[0];


Please let me know if it helped you.


Cheers, 

Giuliana.


Update: The code was incomplete so I edited it. Also, I forgot to mention that you need to set the RowHeader option to Entities.RowHeader.Empty.

2022-11-12 11-28-30
Gonçalo Martins
Staff

Hello @AndreRocha 

I believe that this is the exact same use case as described here
If it's the same, all the explanations and possibilities are already documented and, it is not provided out of the box as mentioned. If you have more information or a different use case, please feel free to share it.

Cheers,
GM

2022-09-29 13-59-54
AndreRocha

The difference is the use case mentioned is for traditional web

2022-07-19 16-56-14
Giuliana Silva
Staff
Solution

Hi @AndreRocha,


In order to achieve this behaviour in DataGrid Reactive, add a Client Action to the OnInitialize DataGrid event with a JS Node containing the following code:


const grid = GridAPI.GridManager.GetGridById($parameters.GridWidgetId);

let selector = new wijmo.grid.selector.Selector(grid);

grid.provider.headersVisibility = wijmo.grid.HeadersVisibility.All;

selector.column = grid.provider.rowHeaders.columns[0];


Please let me know if it helped you.


Cheers, 

Giuliana.


Update: The code was incomplete so I edited it. Also, I forgot to mention that you need to set the RowHeader option to Entities.RowHeader.Empty.

2022-09-29 13-59-54
AndreRocha

Thank you so much! 
Never thought of making the RowHeader option to Empty, that fixed it!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.