This is a migrated thread and some comments may be shown as answers.

Event then worksheet has been added or removed from workbook

3 Answers 47 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Dmitry
Top achievements
Rank 1
Dmitry asked on 11 Dec 2014, 03:14 PM
Is there a way to determine then worksheet has been added or removed from workbook?

3 Answers, 1 is accepted

Sort by
0
Nikolay Demirev
Telerik team
answered on 13 Dec 2014, 09:07 AM
Hi Dimitry,

The sheets collection contains Changed event that can notify you for adding, removing or rearranging the sheets. Here is a sample code showing how you can use the Changed event:
this.radSpreadsheet.Workbook.Sheets.Changed += this.Sheets_Changed;
 
private void Sheets_Changed(object sender, SheetCollectionChangedEventArgs e)
{
    switch (e.ChangeType)
    {
        case SheetCollectionChangeType.Add:
            break;
        case SheetCollectionChangeType.Move:
            break;
        case SheetCollectionChangeType.Remove:
            break;
    }
}


Regards,
Nikolay Demirev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Dmitry
Top achievements
Rank 1
answered on 15 Dec 2014, 02:34 PM
Thank you!

But how do i figure out witch worksheet have been removed, added or moved?

0
Anna
Telerik team
answered on 18 Dec 2014, 11:48 AM
Hi Dmitry,

At the moment the event arguments do not provide information regarding which sheet has been modified. I am going to include this as an item in our backlog to be implemented in the future. For the time being what I can suggest to work around this limitation is to keep a separate sheet collection which you can compare to the existing one in order to determine which is the modified sheet.

I hope this helps. Please, let me know if you have any concerns.

Regards,
Anna
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Spreadsheet
Asked by
Dmitry
Top achievements
Rank 1
Answers by
Nikolay Demirev
Telerik team
Dmitry
Top achievements
Rank 1
Anna
Telerik team
Share this question
or