Resolved Entering data through keyboard in datagridview

Tom Seybert

New member
Joined
Mar 25, 2023
Messages
3
Location
Dallas, PA
Programming Experience
1-3
I would like to use a datagridview control to enter data. Specifically I would like to use the keyboard to enter rainfall amounts into datagridview cells for multiple time steps. I expect the number of data points (cells used) to be anywhere from 10 to 500. I simply cannot find any information on how to do this using the Microsoft on-line documentation for VB.NET. Any help would be greatly appreciated. Thanks.
 
There's something here you're not telling us. You use the keyboard the same way you do for any other control. What specific issue are you having that you're not explaining?
 
There's something here you're not telling us. You use the keyboard the same way you do for any other control. What specific issue are you having that you're not explaining?

I created the datagridview control on my form. I think my issue is that I do not have a property set correctly to allow data entry directly through the cells in the datagridview. The behavior EditMode property is set to EditOnKeystrokeOrF2, however when running the code I am not able to key any data into the cells. The datagrid view has four columns. I am filling the first three columns with data using code. The user must complete the fourth column by entering data manually using the keyboard. For whatever reason, I cannot click a cell in the fourth column and enter data. The column ReadOnly property is set to False. Being one that has not used datagridview until this application, I am at a loss as to what I need to do. If I need to explain more I will try. I really appreciate your response to my question.
 
It sounds like you have done something to cause that as it is not the default behaviour, but what exactly you did is anyone's guess. What I suggest is that you create a new project and do the absolute minimum to reproduce the issue. If you can't reproduce it then you obviously did something extra in your original project, so you need to compare to determine what. If you can reproduce it, explain the exact steps you followed to us so we can reproduce it too and see what you did wrong.
 
It sounds like you have done something to cause that as it is not the default behaviour, but what exactly you did is anyone's guess. What I suggest is that you create a new project and do the absolute minimum to reproduce the issue. If you can't reproduce it then you obviously did something extra in your original project, so you need to compare to determine what. If you can reproduce it, explain the exact steps you followed to us so we can reproduce it too and see what you did wrong.

Well, I did not quite follow your suggestions and I regret not doing so. In haste, I deleted the datagridview control causing the problem. I created a new one and made the changes needed to set it up. I changed the minimum number of properties of the datagridview and the columns. Now, I have it working. But now, I don't know what I did incorrectly. My error. On the one hand I am happy that it is working. On the other, I will never know what I did wrong.

Thank you for the suggestions. I appreciate your help very much.
 
Back
Top