In DataGridView, how can i input data then add row

in order to add new row you have to define column in your grid then just add row like this
for example i have to textboxes txtName , txtFatherName and a grid with two columns , name and father name , a button , i want to add new row in my grid by clicking that button. use this code at the click event of the button


this will add row to your grid.


thanks a lot! Problem solved!

Best Regards!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.