39
Views
3
Comments
How to get datagrid's all data to check value?
Question
Application Type
Reactive

When adding new data to DataGrid, I want to get all the data in the current DataGrid to check if there is existing data. How can I do this? There are page breaks, so I want all the data, not just the current page. I think I can get it with JS.

2025-12-04 09-01-03
Kiet Phan
Champion

Yes, you can retrive all data from DataGrid by this JS below:

  1. let grid = OutSystems.GridAPI.GridManager.GetGridById("MyGrid");
  2. let allData = grid.dataSource.getData();

UserImage.jpg
Rounak Rawat

Hii @ren liyuan,

You can also try with this js code.

  •  Data Grid JavaScript API to fetch the data directly from the widget. 

hope it will work.

var grid = GridOS.getGrid('<GridId>'); 

var currentData = grid.getData();

 return currentData; 

Regards,

Rounak Rawat

2024-12-02 13-16-47
Vipin Yadav

Hi ren liyuan,

Could you please share the OML file ? I will make the necessary changes and revert to you. 

Thanks,

Vipin Yadav

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