Posted 8 September 2017, 2:59 pm EST
I have a case where I need to save spread data to a SQL Table via Entity Framework. Since I am not trying to turn the Spread control into a grid view-but actually need the data as a spreadsheet, I am not binding the Spread control directly to an entity. This would simply map each spreadsheet column to a entity (or SQL Table) column.
Rather, I have derived a class from FpSpread in conjunction with a class derived from DefaultSheetDataModel to maintain a list of changes made to cells during a session.
This allows me to limit the number of updates applied to the database to the number of changed cells. If I only change 10 out of 50,000 cells I only want ten transactions with the database. I have had to do this as a combination of classes derived from DefaultSheetModel and FpSpread because the SheetDataModelEventArgs cover added cells, deleted cells and updated cells all under one blanket SheetDataModelEventType.CellsUpdated.
1. In a class derived from DefaultSheetDataModel, is there a way to determine the type of update (add, edit, delete) to a cell?
2. Is there a DefaultSheetDataModel.DataSource object type that would allow me to maintain a spreadsheet type interface (and not transform the Spread control into a column centric grid)?
3. Can I capture the data for large spreadsheets including formulas and formatting in a performant manner to XML?