We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Add and Delete Row events

For the sfSpreadsheet control, Does anyone know

1. Are there events fired when then user selects  InsertRow or  DeleteRow ?
2. Can these command, and others, be removed from the Spreadsheet control context menu (when right click on a cell)
3. Can these commands, and others, be removed from the Spreadsheet Ribbon control?


I have spent quite some time reading all knowledge base, but no references to these seem to exist

James

1 Reply

KB Kanimozhi Bharathi Syncfusion Team September 7, 2016 10:21 AM UTC

Hi James, 
 
Thank you for contacting Syncfusion Support. 
 
Please find the details below, 
 
QUERY 
RESPONSE 
Are there events fired when then user selects  InsertRow or  DeleteRow ? 
 
While inserting row/column or deleting row/column, the following Events of SpreadsheetGridModel class are fired, 
 
1)      ColumnsInserted 
2)      ColumnsRemoved 
3)      RowsInserted 
4)      RowsRemoved 
 
Can these command, and others, be removed from the Spreadsheet control context menu (when right click on a cell) 
The existing menu items in the cell context menu can be removed by invoking CellContextMenuOpening event like below code example, 
 
spreadsheet.ActiveGrid.CellContextMenuOpening += ActiveGrid_CellContextMenuOpening;  
void ActiveGrid_CellContextMenuOpening(object sender, CellContextMenuOpeningEventArgs e) 
{  
//Get the existing Context menu items 
var items = spreadsheet.ActiveGrid.CellContextMenu.Items; 
//Remove the existing Context menu  
spreadsheet.ActiveGrid.CellContextMenu.Items.RemoveAt(6); 
} 
 
 
Please find the UG link for your reference, 
 
 
 
Can these commands, and others, be removed from the Spreadsheet Ribbon control? 
 
Yes. You can remove the ribbon tab and also  ribbon items from the ribbon tab. Please find the UG link for your reference, 
 
 
 
 
Regards 
Kanimozhi B 


Loader.
Live Chat Icon For mobile
Up arrow icon