Grid Refresh method

Official Content
This documentation is valid for:

Refreshes only the Grid to which the method is applied. It triggers the Grid Refresh event and subsequently the Grid Load event (N times or once, depending on whether the Grid has a base table or not).

Syntax

Event 'User-event'
     .......
     GridName.Refresh()
endevent

Where:

GridName
       Is the name of the Grid control to be refreshed.

Scope

Controls: Grid
Generators: .NET, .NET Framework, JavaApple, Android

Note: In Java, this method is supported when Web User Experience property is set to "Smooth".

Samples

In the example explained in HowTo:Develop a messaging web page each time a new post is added by a user, the Grid which displays the posts is refreshed but not the whole page where it is contained.

Event 'Postcomment'
     InsertNewComment.Call(PostId, &newcomment)
     &newcomment=""
     Grid1.Refresh()
Endevent