Question Form needs to appear blank and ready for entry


New member
Aug 10, 2015
Programming Experience
I am a new member of this forum and a C# newbie who is currently building a data entry form that I need to be able to only take in new data and write it to a backed SQL Server database. I don't want previous data that has been entered to be displayed. I have a form built and connected to the database but the form comes up displaying the first record from the table it will be writing to. Is there a setting or a way that I can be connected to that table and display the fileds for that table empty and ready for new entry?
Please forgive the simple nature of this question but I have spent a good deal of time trying to figure this out on my own and could not find a question in the forum of a similar nature. Any help or guidance provided would be greatly appreciated!
BindingSource.AddNew method should probably be what you look for.
Eureka! Added it to the form load and I'm on a new record when I start the app. Now if I can just figure out how to make the existing records read-only....I'll be all set! Thank you very much!
Now if I can just figure out how to make the existing records read-only....
One suggestion I found was to use for example DataGridView.CellClick event, where you conditionally set the rows ReadOnly property, for example based on the rows IsNewRow property.
Top Bottom