Tutorial :how to make BindingNavigatorAddNewItem to ask primary key in a dialog?



Question:

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.


Solution:1

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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »