27
Views
5
Comments
Solved
[OutSystems Data Grid] When certain behavior occurs, deselect all checkboxes in the DataGrid
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive
Service Studio Version
11.53.43 (Build 62091)

I want to deselect all checkboxes in a DataGrid when a certain action (e.g., clicking a button) occurs.

What should I do?

OML is also attached.

DataGridAllCheckBoxFalse.oml
2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

Hi @Arakawa Haruka ,

You can check solution from this post: https://www.outsystems.com/forums/discussion/76205/outsystems-data-grid-how-to-reset-checkbox-selection-inside-client-action/ .

Update your JS from the button client action to the following script:

var gObj = OutSystems.GridAPI.GridManager.GetGridById($parameters.GridWidgetId);

var checkedRows = gObj.provider.selectedItems;

for (var i = 0; i < checkedRows.length; i++) {    checkedRows[i].__osRowMetadata.delete("__rowSelection");

}

gObj.provider.refresh();

UserImage.jpg
Arakawa Haruka

@Beatriz Sabino @Mihai Melencu 

It worked! Thank you very much!

2022-12-22 10-00-39
Beatriz Sabino

Hi Arakawa,

I have updated your .oml, specifically the JavaScript script in your ButtonOnClick action.

Hope this helps.

DataGridAllCheckBoxFalse_updated.oml
2026-01-28 16-57-48
Mihai Melencu
Champion

Hi, this seems to only uncheck the checkboxes without actually deselecting the rows. 

2022-12-22 10-00-39
Beatriz Sabino

You're right, I only focused on the deselect the checkboxes and missed the logic to deselect the row as well. 

2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

Hi @Arakawa Haruka ,

You can check solution from this post: https://www.outsystems.com/forums/discussion/76205/outsystems-data-grid-how-to-reset-checkbox-selection-inside-client-action/ .

Update your JS from the button client action to the following script:

var gObj = OutSystems.GridAPI.GridManager.GetGridById($parameters.GridWidgetId);

var checkedRows = gObj.provider.selectedItems;

for (var i = 0; i < checkedRows.length; i++) {    checkedRows[i].__osRowMetadata.delete("__rowSelection");

}

gObj.provider.refresh();

UserImage.jpg
Arakawa Haruka

@Beatriz Sabino @Mihai Melencu 

It worked! Thank you very much!

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