C1FlexGrid Save Edits To Database

Posted by: mwebster on 28 February 2019, 10:32 am EST

  • Posted 28 February 2019, 10:32 am EST

    Having an odd issue with the C1FlexGrid. I have a strongly typed dataset that I am binding to the C1FlexGrid. It displays data fine and allows users to edit the data. I am using the AfterEdit method to try to write the changes back to the database using this code:

    Private Sub fgDocuments_AfterEdit(sender As Object, e As RowColEventArgs) Handles fgDocuments.AfterEdit
        Dim DocumentsAdapter As New CompanyDataTableAdapters.CustomerDocumentsTableAdapter
        DocumentsAdapter.Connection.ConnectionString = ConnStr
        DocumentsAdapter.Update(fgDocuments.DataSource)
    End Sub
    

    The code executes without error but does NOT write any changes back to the database. The Adapter has all relevant commands. the DataAdapter.Update method seems to do absolutely nothing. Any suggestions?

  • Posted 1 March 2019, 9:07 am EST

    Thanks,

    Mike

  • Posted 4 March 2019, 12:25 am EST

    Hello,

    You can refer to the “DBUpdate” product sample(located at ~\Documents\ComponentOne Samples\WinForms\C1FlexGrid\CS\DBUpdate).

    Please feel free to revert if you still have some questions.

    Thanks.

Need extra support?

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

Learn More

Forum Channels