AllowEditing False is not working on all sheets

Dear Team, 

WorkBook_Loaded Event -> ActiveGrid.AllowEditing = false.  it just apply editingFalse to current sheet when i change sheet using mouse others sheets are editable.


i want all the sheets to be disable for editing

Thanks

1 Reply

AR Arulpriya Ramalingam Syncfusion Team March 3, 2020 08:42 AM UTC

Hi Muneeb, 
 
Thank you for your interest in Syncfusion products. 
 
In order to disable the editing for all the sheets in a Workbook, the WorkbookLoaded event can be used. In that event, the GridCollection holds grid of all the sheets that can be used to disable the editing for all the grids of spreadsheet. Please make use of the below code and sample. 
 
Example code 
 
//Event subscription. 
spreadsheetControl.WorkbookLoaded += SpreadsheetControl_WorkbookLoaded; 
 
//Event customization 
private void SpreadsheetControl_WorkbookLoaded(object sender, WorkbookLoadedEventArgs args) 
{ 
    foreach (var grid in args.GridCollection) 
    { 
        //To disable the editing of worksheets. 
        grid.AllowEditing = false; 
    } 
} 
 
 
Please get back to us, if you have any other queries. 
 
Regards, 
Arulpriya 


Loader.
Up arrow icon