178
Views
10
Comments
Solved
[OutSystems Data Grid] Datagrid not clean record if we update the data with an empty object
Question
outsystems-data-grid
Reactive icon
Forge asset by OutSystems

Hi,

If I load a list of records (a json in the data parameter) to the data grid and after that, if I change the data with a empty json, the grid not refresh, just show the empty placeholder over the old lines.


best Regards,

Bruno F. Cantante

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

Hi @Ryohei Ito 

To achieve that you can use the client action ClearGridChanges (all client actions can be checked here).

Just use it on your ClearOnClick:

Hope it helps!

Cheers,
GM

2020-08-05 09-00-16
Gabriel Lundgren

Hello,

Could you please share a sample with us so we can have a better look at it?

Thank you,
Gabriel Lundgren

2025-06-03 16-30-12
bfcantante

Hi,


Best Regards,

Bruno F. Cantante

CloneOfDataGridSampleReactive.oml
2020-08-05 09-00-16
Gabriel Lundgren

Hello Bruno,

We are taking a look at this issue and have added it to our backlog. For now, we don't have a workaround, but as soon as we have a fix, I'll let you know.

Thanks,
Gabriel Lundgren

 

UserImage.jpg
Linus Lim

Hello, I have the same exact problem as well. Is there a fix for this yet?

A temporary workaround I am relying on is to avoid supplying an empty JSON as Bruno explained. Instead, I do provide a JSON string but with empty parameters. This helps to clear out the results from a previous query to the grid.

However, the drawback of this workaround is the "We couldn't find any data to show here." message will no longer appear.

Thank you.

Best regards

Linus

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi Linus,

these are a couple of things you could try, i can't make the headers go away entirely, it only works if I leave at least one item in metadata, but that can be an empty name.

Dorine

UserImage.jpg
Linus Lim

Hi Dorine,

Your suggestion works like a charm - Many thanks and enjoy the weekend!

Regards

Linus

UserImage.jpg
Ryohei Ito

I was looking into the following problem with DataGrid and came across this page.

Has the DataGrid bug been fixed?


My event

Search processing does not refresh old data when search conditions remain the same

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

Hi @Ryohei Ito 

Can you please share an oml reproducing what you're mentioning?
Please indicate the steps to reproduce on that oml and indicate the OS Datagrid version.

Cheers,
GM

UserImage.jpg
Ryohei Ito

MyVersion:Version 2.11.0


Show only one row of stored data

Add a row

Correct the added data and click the search button.


I do not want data that has not been saved to be displayed when the search button is pressed.

I want to reset the data for adding, deleting, and editing rows when I press the search button.



https://ito-ryohei.outsystemscloud.com/DataGridTest/Screen1



DataGridTest.oml
2022-11-12 11-28-30
Gonçalo Martins
Staff
Solution

Hi @Ryohei Ito 

To achieve that you can use the client action ClearGridChanges (all client actions can be checked here).

Just use it on your ClearOnClick:

Hope it helps!

Cheers,
GM

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