tags:

views:

284

answers:

1

how to make BindingNavigatorAddNewItem to ask primary key in a dialog while new row is created after button is clicked?

currently its adding blank row to end of DATAGRIDVIEW that is a big confusing for end user , if user forgets to enter primary key exception occurs.

A: 

In most cases users should not be aware of primary keys. Instead of having to enter a primary key, let the database auto-generate one for you by setting the key as an identity column.

You tagged this asp.net but the question is a win-forms question.

Michael