Event then worksheet has been added or removed from workbook

4 posts, 0 answers
  1. Dmitry
    Dmitry avatar
    5 posts
    Member since:
    Oct 2010

    Posted 11 Dec 2014 Link to this post

    Is there a way to determine then worksheet has been added or removed from workbook?
  2. Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    103 posts

    Posted 13 Dec 2014 Link to this post

    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.

     
  3. DevCraft banner
  4. Dmitry
    Dmitry avatar
    5 posts
    Member since:
    Oct 2010

    Posted 15 Dec 2014 in reply to Nikolay Demirev Link to this post

    Thank you!

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

  5. Anna
    Admin
    Anna avatar
    99 posts

    Posted 18 Dec 2014 Link to this post

    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.

     
Back to Top