Intersoft WebGrid Documentation
How-to: Get the column's name when editing a cell using OnEnterEditMode
See Also Send comments on this topic.

Glossary Item Box

This walkthrough will show you how to use OnEnterEditMode client side event.

In this topic, you will learn the basic thing on how to get column's name when editing a cell using OnEnterEditMode.

To get column's name when editing a cell using OnEnterEditMode

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

    JavaScript Copy ImageCopy Code
    function WebGrid1_OnEnterEditMode(controlId, tblName, editObject)
    {
            var WebGrid1 = ISGetObject(controlId); 
            var cell = editObject.cellElement;
            alert(wgGetColNameByCell(cell));
            return true;
    }
    

  4. Run the project.

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.