سؤال

I don't know think I wrote any code for this since the properties are all default. I don't want the user to have to add those by themselves when it is in the middle of the run.

It lets me add in columns but not rows in the designer.

Is there any property that can start the program with more than 1 row in the data grid view?

هل كانت مفيدة؟

المحلول

Populating the grid with data must be done with code. If you populate the grid in the Load event handler then the user will see that data when the form is displayed. You can add data directly to the grid or you can populate a DataTable or some other list and bind that to the grid.

If you're saying that you actually want multiple blank rows in the grid then you need to add those rows. The row you see by default is not actually part of the data of the grid. It's just there to indicate to the user that they can enter data.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top