Refresh / update Data Grid after Datamaster insert without reloading the whole page

Pierre shared this problem 4 years ago
Solved

How can I refresh a Data Grid to show the changes?


Hello, I found I can delete a row in a data-grid and the row disappears instantly.


In the same way, I would like a newly inserted row to appear immediately as I insert it into the corresponding data-master, and that, without reloading the screen.

Comments (3)

photo
1

Hi,


Take a look to this tutorial:


http://www.justinmind.com/usernote/te...


Best regards.

photo
1

Hello,


I wish I was in HTML but unfortunately not. Try this tutorial in Prototyper, it doesn't work.


The data is added into the data master correctly. But the new row doesn't show in the Data Grid, unless I reload the screen.


Could you look into it please? Thanks.

photo
1

Here's the example


1. Go to the data masters tab and create a new data master. Name it 'record action save' and create two attributes: first name and last name. Then press ok. Double-click on the data master you've just created and select the tab 'view and edit records'. Write some example data there. Then press ok.


2. Now drag a data grid widget to the screen. Name it 'samples' and select the data master. Then select all the attributes.


3. Drag some labels and input texts to draw the input form in the example or just drag the data master to the screen.


4. Drag a button, select it and go to the 'events' tab. Push the 'add event' button, select "on click" and select the option 'data master action'. Now press the button 'new' under the data master 'sample'. Build this expression:


2cc9eb1e16c4ae6719cc73d63936559e


Press ok twice.


5. Now click on the icon arrow next to the word 'do' in the 'events' tab and select 'add action'. Select 'set value', then the entire data grid and press the calculator button. We need to refresh the data grid in order to see the new record, so you just need to drag the data master 'record action save' to the expression. Press ok twice and you have finished.