You only need one code to perform refresh to Grid2. The ClientAction engine is able
to perform "cross-grid" operation where the grid in context (WebGrid1) is different
with grid to refresh (WebGrid2).
In this topic, you will learn the basic thing on how to refresh second grid after
invoking OnTheFlyPostBack of first grid.
To refresh second WebGrid after SendCustomRequest
- Go to WebGrid properties, server side event.
- Attach the WebGrid InitializePostBack event into the WebGrid.
- Inside of the e.Action == PostBackAction.Custom condition,
use ClientAction engine to perform a client side Refresh method.
private void WebGrid1_InitializePostBack(object sender,
ISNet.WebUI.WebGrid.PostbackEventArgs e)
{
if (e.Action == PostBackAction.Custom)
{
// perform business logic here
WebGrid2.ClientAction.Refresh();
}
}
|
- Run the project.