Intersoft WebGrid Documentation
How-to: Activate edit mode in a specific cell
See Also Send comments on this topic.

Glossary Item Box

Use ActiveEditMode function to activate WebGrid edit mode in client side.

This topic will show you how to activate WebGrid's edit mode in a specific cell.

To activate or deactivate WebGrid edit mode in a specific cell

  1. Drag WebGrid instance into the WebForm.
  2. Add a client side function on your code.
  3. You can activate edit mode by simply using:

  4. JavaScript Copy Code
    function SelectNewRow()
    {
    var grid = ISGetObject("WebGrid1");
    var newRowElement = grid.RootTable.GetNewRow(); // return the html element of the newrow
    var newRow = grid.RootTable.ToRowObject(newRowElement); // convert to WebGridRow object

    newRow.Select(); // select new row

    var cells = newRow.GetCells(); // populate cells
    cells.GetNamedItem("City").ActivateEdit();
    }

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.