Intersoft WebGrid Documentation
How-to: Accept all changes
See Also Send comments on this topic.

Glossary Item Box

WebGrid 7 also supports scenario that submits all updates in a single AJAX request via built-in WebGrid user interface, or via API.

In this topic, you will learn how to accept all changes from client side event.

To accept all changes

  1. Creating Updatable Hierarchical WebGrid in Batch Update mode (Using ISDataSource).
  2. Open the page in VS Design view and add an HTML button.
  3. Double click the button in order to add OnClick client side event of the button.

    <input id="Button1" type="button" value="Accept All Changes" onclick="return Button1_onclick()" />    
    
  4. On OnClick event of the button, write the following function:
    C# Copy Code
    function Button1_onclick()
    {    
       var grid = ISGetObject("WebGrid1");    
       grid.AcceptAllChanges();     
       return true;
    }
    

  5. View the page in browser, make any changes to the grid, and click the button to accept all changes.

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.