Intersoft WebGrid Documentation
How-to: Modify other cell's value based on the selected value using OnExitEditMode
See Also Send comments on this topic.

Glossary Item Box

This walkthrough shows you how to use OnExitEditMode client side event.

In this topic, you will learn the basic thing on how to modify other cell's value based on the selected value using OnExitEditMode.

To modify other cell's value based on the selected value using OnExitEditMode

  1. Select WebGrid's instance and press F4.
  2. In Layout Settings, select ClientSideEvents, then set OnExitEditMode to WebGrid1_OnExitEditMode.
  3. Write the following function in OnExitEditMode client side event:

    JavaScript Copy ImageCopy Code
    function WebGrid1_OnExitEditMode(controlId, tblName, editObject)
    {
      var WebGrid1 = ISGetObject(controlId);
      var editObj = editObject.element.value;
      if (editObj == "Brad")
      {
        var selObj = WebGrid1.GetSelectedObject();
        var cell = selObj.ToRowObject().GetCells();
        cell[9].SetText("UK", true);
        cell[9].SetValue("UK");
      }
      return true;
    }
    

  4. Run the project.

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.