Null datetime stopping position change

  • Thread starter Thread starter Ken Foskey
  • Start date Start date
K

Ken Foskey

I have a problem with the following if the EndDate on the database is
Null. Knowing this I can code around it but not knowing it was a very
frustrating experience!

endDateTimePicker.DataBindings.Add(new Binding("Value",
MyDB.GameBindingSource, "EndDate"));

when I move position onto a record with a null enddate the BindingSource
it moves back again.

If anyone has a really good solution to the problem please let me know.

Ta
Ken
 
I have a problem with the following if the EndDate on the database is
Null.  Knowing this I can code around it but not knowing it was a very
frustrating experience!

endDateTimePicker.DataBindings.Add(new Binding("Value",
MyDB.GameBindingSource, "EndDate"));

when I move position onto a record with a null enddate the BindingSource
it moves back again.

If anyone has a really good solution to the problem please let me know.

Ta
Ken

Hi,

Can you better explain your problem? I got confused with the "move
back"/forward
 
Hi,

Can you better explain your problem? I got confused with the "move
back"/forward

I have 4 rows. Rows 0 and 3 have dates in the EndDate column, Rows 1
and 2 do not have dates.

If I set position to 0 or 3 it works correctly, Current changes.

If I set position to 1 or 2 it very briefly changes (form title bar is
tied to the database table) and then changes back, if I start at 0 it
switches to 1 then immediately switches back to 0. If I start at 3 it
switches to 1 then immediately switches back to 3.

Once I remove the databinding on the datetime component it works fine.

This also breaks AddNew because the date time of a number of fields are
null and I have to set up the record then MoveLast to switch it.

Thanks
Ken
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top