We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Prevent Datagrid to create a row when dataset is empty (C#)

I attached a smaple solution to show my problem. When Form1 is created a new row is added with Customer ID 1. If I press ESC the row is removed. I want to prevent this default row creation. If the last line in Form1.cs is unmarked then two customers are created and no default row. I can't find anything from MSDN help on this.

Live Chat Icon For mobile
Up arrow icon