DATAGRID with empty rows

0

what I want to do in C # is to call a datagrid, to show me a series of rows (the amount I define in each case) empty to make the form more presentable and then I work in each of the cells

thank you very much

Pablo

    
asked by Pablo 03.08.2018 в 19:04
source

1 answer

0

To add a new row in a DataGridView, there is the Add () method in Rows. Something like this:

DataGridView1.Rows.Add();

Then to access and add values, you get your index as Rows.Count-1

var i = DataGridView1.Rows.Count - 1;
DataGridView1.Rows[i].Cells[0].value = "Escribe tu valor"

I hope you serve

    
answered by 05.08.2018 в 00:17