This event is cancelable.
Me.WebDataGrid1.Behaviors.EditingCore.EditingClientEvents.RowAdding = "WDG1_RowAdding"
this.WebDataGrid1.Behaviors.EditingCore.EditingClientEvents.RowAdding = "WDG1_RowAdding";
// The client event RowAdding takes two parameters sender and e // sender is the object which is raising the event // e is the CancelAddRowEventArgs function WDG1_RowAdding(sender, e) { //Returns the cell values for the new row var cellValues = e.get_cellValues(); if (!confirm("Are you sure you want to enter a new row with cell values '" + cellValues[0] + "', '" + cellValues[1] + "', '" + cellValues[2] + "'?")) //Cancels the 'RowAdding' event e.set_cancel(true); }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2