BindingSource and EndEdit

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Echooff3
    New Member
    • Jul 2007
    • 22

    #1

    BindingSource and EndEdit

    I'm totally mystified!

    I have a form with fields that are databound to a bindingsource. (bindingsource is attached to a datatable and so on and so on.) Everything updates fine except for one field (PRICE). Everytime I call EndEdit on the bindingsource it always reverts back to the inital value that was created when the record was created.

    I've checked the dataset time and time again and the PRICE field is:
    Unique: False
    AllowNulls: True
    ReadOnly: False

    Anyone else expierence a simular issue?
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    #2
    Originally posted by Echooff3
    I'm totally mystified!

    I have a form with fields that are databound to a bindingsource. (bindingsource is attached to a datatable and so on and so on.) Everything updates fine except for one field (PRICE). Everytime I call EndEdit on the bindingsource it always reverts back to the inital value that was created when the record was created.

    I've checked the dataset time and time again and the PRICE field is:
    Unique: False
    AllowNulls: True
    ReadOnly: False

    Anyone else expierence a simular issue?
    Yes, i have had a few nightmares with that.
    Depends when and where do u call the endEdit?

    If you call if when the focus leaves the control, then it will revert back to the previous value.

    i generally try to keep it on the click of a button. or when some other control gains focus.

    Comment

    Working...