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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Refresh sheets

Thread ID:





124812 Jul 1,2016 02:48 AM UTC Jul 5,2016 09:13 AM UTC WPF 3
Tags: SfSpreadsheet
Asked On July 1, 2016 02:48 AM UTC

In sfSpreadsheet ,I load the excel template and set data  in code,.it has two sheets.How to refresh all sheets in sfSpreadsheet ,spreadsheet.ActiveGrid.InvalidateCells() seems only refresh the active grid.

Kanimozhi Bharathi [Syncfusion]
Replied On July 1, 2016 10:49 AM UTC

Hi Ray,   
You can access each SpreadsheetGrid in SfSpreadsheet by invoking the WorkbookLoaded Event  or by  passing the worksheet name in  GridCollection Property  and call the  InvalidateCells method to refresh the view.   
Please find the code example for your reference,   
spreadsheet.WorkbookLoaded += spreadsheet_WorkbookLoaded;   
void spreadsheet_WorkbookLoaded(object sender, WorkbookLoadedEventArgs args)   
   foreach (var grid in args.GridCollection)   
     grid. InvalidateCells();   
var sheet1 = spreadsheet.Workbook.Worksheets[0];   
var sheet2=  spreadsheet.Workbook.Worksheets[1];   
You can also refer the below UG links to access each grid and refreshing the view,   
Kanimozhi B   

Replied On July 4, 2016 03:48 PM UTC


Kanimozhi Bharathi [Syncfusion]
Replied On July 5, 2016 09:13 AM UTC

Hi Ray, 
Thank you for your update. 
Kanimozhi B 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon