Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

howto cancel bindingnavigator "+" action

26 views
Skip to first unread message

dl

unread,
Oct 30, 2009, 2:51:01 AM10/30/09
to
Hi

I have built a form by dragging a dataset over onto the designer, then I got
this BindingNavigator for free. But I found whenever the user clicked either
the "move first" or the "move previous" button right after he/she had clicked
the "+" button without committing the "add new" action, the system throw a
NoNullException error. How do I Cancel this "+" action gracefully please?

TIA

John Bundy

unread,
Oct 30, 2009, 10:24:01 AM10/30/09
to
It all depends, if you go to your .xsd (right click data source, configure in
designer) you can do many things:
Have it throw no exception
create a row change event that deletes the row if it is blank before they move

better:

set an autoincrementing column so there is always data, then change the
update to only update if other columns are not blank
create a form that they will use to enter info, then a button that appends
that to the datagrid

--
-John http://www.jmbundy.blogspot.com/
Please rate when your question is answered to help us and others know what
is helpful.

dl

unread,
Nov 2, 2009, 8:26:01 PM11/2/09
to
tks. But is there something we can do on the client side as soon as the user
click a button?

dl

unread,
Nov 3, 2009, 5:51:01 AM11/3/09
to
Sorry I missed this "row change event", but where can I find this "row change
event" please?!

dl

unread,
Nov 3, 2009, 5:56:05 AM11/3/09
to
Sorry that I missed this "row change event". But where can I find this
event, please?
I have a detail view of the dataset instead of a datagridview!

TIA

dl

unread,
Dec 6, 2009, 8:36:01 AM12/6/09
to
Thanks John
I found the way to override the default action for the movefirst button, and
call the canceledit in that click event; however, I am having some problem
with the autonumber field after the canceledit, please see my new post in
this same group!
0 new messages