New Posts New Posts RSS Feed: Grid Editing Control doesn't always update the Binding Source
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Grid Editing Control doesn't always update the Binding Source

 Post Reply Post Reply
Author
Miszou View Drop Down
Newbie
Newbie
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 19
Post Options Post Options   Quote Miszou Quote  Post ReplyReply Direct Link To This Post Topic: Grid Editing Control doesn't always update the Binding Source
    Posted: 14-Nov-2007 at 1:59pm
I have a custom editing control (Nullable Date Picker) for use in a grid, and no matter what I try, I cannot get it to work properly. I am almost there, but there is one last thing that just won't work!
 
If I edit (TextBox) the value in the control, and then click another cell in the grid, the value is accepted and the binding source is updated.
 
However, if I press the Tab key to move to the next cell, the value is discarded and replaced with the previous value. All the relevant events fire (TextBox.Validating, TextBox.Validated etc), but the value is not updated in Binding Source.
 
Upon further investigation, it appears that the CurrentItemChanged event of the BindingSource is only fired if I change focus with the mouse.
 
I know that I'm close to getting this to work, but I just can't figure out why it would work when changing cell focus from a mouse event and not a keyboard event!
 
Any help would be greatly appreciated!
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 14-Nov-2007 at 3:12pm
Do you have a DataBinder for  your CustomNullableDatePicker working as  a Loose Control and another DataBinder for your CustomNullableDatePicker when it is working inside of a Grid?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down