Intersoft WebGrid Documentation
How-to: Update or delete a row on button click
See Also Send comments on this topic.

Glossary Item Box

On client side, we also can manipulate grid row such as Update or Delete row.

This topic will show you how to update or delete row in WebGrid.

To update or delete a row on button click

  1. Drag WebGrid instance into the WebForm.
  2. Add a client side function on your code.
  3. You can update or delete grid's row by simply using:

  4. JavaScript Copy Code
    function DeleteRow()
    {
    var grid = ISGetObject("WebGrid1");
    var row = grid.RootTable.GetRowByKeyValue("VINET");




    row.Delete(); // delete this row
    alert("Customer 'VINET' has been deleted!");
    }
    function UpdateRow()
    {
    var grid = ISGetObject("WebGrid1");
    var row = grid.RootTable.GetRowByKeyValue("SPLIR");
     row.Update(); // perform Update
    alert("ContactTitle of this row has been changed to 'Owner'");
    }

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.