Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1875
Cancel edit on a boundcheckboxfield in a webdatagrid
posted

In the grid, it have the <CellEditingClientEvents EnteringEditMode="grid_CellEditing_EnteringEditMode" /> there. The function stops the editing of the other fields but doe not stop editing from happening on the checkbox fields.

function grid_CellEditing_EnteringEditMode(sender, eventArgs) {
     eventArgs.set_cancel(true)
}

Parents
  • 2490
    Offline posted

    Hello Angela, 

    Thank you for the code sample you have sent.

    Clicking on BoundCheckBoxField will not trigger it to go into edit mode and EnteringEditMode will not be cancelable. You can use CellValueChanging event instead. 

    function WebHierarchicalDataGrid1_Editing_CellValueChanging(sender, eventArgs){
    //my custom logic
    eventArgs.set_cancel(true);
    } 
    

    Sincerely,
    Nick
    Entry-Level Software Developer

Reply Children