c# - bindingnavigator understanding

Discussion in 'Web Design & Coding' started by ZeroHour, May 11, 2007.

  1. ZeroHour

    ZeroHour ho3 ho3 ho3

    I am a noobie with c# in VS 2005 but I have done some ASP.NET using c#.
    The background:
    I have a program that links into MySQL (MSSQL is damn expensive) using a reference called MySQLdriverCS (freeware). I can connect to the db and retrieve a datatable succesfully using this addon. Now once its retrieved and the using speficies a csv file it will compare the csv import (using another addon) with the datatable. This all works as it should thankfully, so then I compare the results from both to determine if there is a new department that needs to have data set (as in the csv has the name of a dep the db does not know about). The comparison then builds another datatable with all the relevant new deparments in there that need to have extra information queried from the user. I then pass this as a datatable parameter into the new form. Once the datatable is there it is bound to into a bindingsource which is then linked to a bindingnavigator and finally linked into the form elements with the following (repeated 3 times for 3 different fields):
    DEP_name.DataBindings.Add(new Binding("Text", this.SETS_bsource, "dep_id", true));

    The problem:
    I can switch between records using the bindingnavigator but when I edit a field I can no longer switch records.
    I know that I need to do something to put the data back into mysql but I was wondering if someone could point me in the right direction. Is my idea of this app flawed and if so how do you recommend doing what I need.
    Thanks for all the advice