Far Point Spread Binding with DataTable and then updating spreadsheet

Posted by: abhishek1991rana on 13 July 2021, 4:00 am EST

  • Posted 13 July 2021, 4:00 am EST

    Hello,

    Thanks for taking out your time.

    I have a set of data in my datatable. i am making this datatable as the data source for the far point spread in my winform application. The following piece of code shows the binding of datatable to far point spread, modAlias.AliasDT is the Datatable here.

    FarPoint.Win.Spread.Model.DefaultSheetDataModel dataModel = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(modAlias.AliasDT);
                SS.ActiveSheet.Models.Data = dataModel;
    

    The data is shown fine in the spreadsheet (which is tied to datatable) when the application is launched.

    Now, user want to make certain changes to this data from the front end spreadsheet. My questions are as follows:

    [1]: If I update any data in the front end spreadsheet, can this data be automatically updated in the datatable also as the datatable is tied to spreadsheet???.

    [2]: If [1] is NO, then what would be the right approach to do it?

  • Posted 13 July 2021, 8:37 am EST

    Hi,

    Any changes in the bound data will be automatically reflected in the DataTable.

    However, if you also want these changes to persist to the actual database, you will need to do this manually since that would depend on the database and the library you are using.

    For instance, if you are using ADO.NET then you will need to use an appropriate adapter for your database for updating.

    Regards,

    Jitender

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels