I'm making custom Excel workbook in Visual Studio with custom Ribbon. I am using DataSet to connect to SQL Server database. Column:
ID|Chance|CustomerDate|ProviderDate|
1| 0| 2014-02-11| 2014-02-27|
2| 5| 2014-03-11| 2014-03-20|
3| 15| 2014-04-11| 2014-04-15|
From custom ribbon I open new wpf window where I can add some rows to data set and save it using this code:
Try
{
this.MyDataSet_AnalisysTableAdapter.Update(this.MyDataSet.Analisys);
}
Catch(Exception)
{
throw;
}
And it works very good.
Next: Using the same DataSet I've added view to Excel worksheet (simply by dragging Table from Data Sources into worksheet). All data are listed properly.
When I change chance
on some row, and save it with the same code as above (of course implemented in Worksheet1.cs) there is no effect in database. Although when I open custom wpf window I can see changes in related tableView, and when I use save method from this window everything is saving as it should...
I need to have opportunity to save change made in worksheet (from worksheet) as well as in this window. So my question is: How can I save changes from Worksheet?