バージョン

EnteringEditMode プロパティ (EditableClientEvents)

セルが編集モードに入る前に発生するイベント。

このイベントはキャンセルできます。

シンタックス
'宣言
 
Public Property EnteringEditMode As String
public string EnteringEditMode {get; set;}
使用例
Me.WebDataGrid1.Behaviors.EditingCore.Behaviors.CellEditing.CellEditingClientEvents.EnteringEditMode = "WDG1CellEditing_EnteringEditMode"


Me.WebDataGrid1.Behaviors.EditingCore.Behaviors.RowAdding.AddNewRowClientEvents.EnteringEditMode = "WDG1RowAdding_EnteringEditMode"
this.WebDataGrid1.Behaviors.EditingCore.Behaviors.CellEditing.CellEditingClientEvents.EnteringEditMode = "WDG1CellEditing_EnteringEditMode";


this.WebDataGrid1.Behaviors.EditingCore.Behaviors.RowAdding.AddNewRowClientEvents.EnteringEditMode = "WDG1RowAdding_EnteringEditMode";
// The client event 'EnteringEditMode' takes two parameters sender and e
    // sender  is the object which is raising the event
    // e is the CancelEditModeEventArgs

function WDG1CellEditing_EnteringEditMode(sender, e) {

            if (!confirm("Are you sure you want to edit the cell?"))

                //Cancels the 'EnteringEditMode' event
                e.set_cancel(true);
                 
        }


     
     // The client event 'EnteringEditMode' takes two parameters sender and e
     // sender  is the object which is raising the event
     // e is the CancelEditModeEventArgs
        function WDG1RowAdding_EnteringEditMode(sender, e) {

            //Returns the cell that is entering edit mode
            var cell = e.getCell();

            //Gets referenceto the column object that contains the cell
            var column = cell.get_column();

            //Returns the key of the column
            var key = column.get_key();
              
            if (!confirm("Are you sure you want to enter a  value in the new cell  under the column '" +key + "'?"))
           
            //Cancels the 'EnteringEditMode' event
                e.set_cancel(true);  

        }
参照