WebGrid has an ability refresh other server controls during the OnTheFly-PostBack context. The architecture now provides these functionalities and therefore resulting in greater user experience.
To refresh other controls during WebGrid update.
This feature can be utilized in 2 ways:-
Manual mode. For even greater control, developers can decide which controls to be refreshed and which are not.
- Attach an UpdateRow event into a grid.
- To refresh individual control, use ClientAction's RenderControl method.
C# Copy Code WebGrid.ClientAction.RenderControl(TextBox1);
- Run the project.
-
Automatic mode. This mode is suitable when you have several controls to be refreshed. This method will intelligently determines which controls have been modified since its ViewState initialization in LoadViewState phase.
- Attach an UpdateRow event into a grid.
- To refresh multiple modified controls automatically, use ClientAction's RefreshModifiedControls method.
C# Copy Code WebGrid1.ClientAction.RefreshModifiedControls();
- Run the project.