Pages

Friday, 5 August 2011

Add Rows to DataGridView in C Sharp (C#) WinForms



In C Sharp (C#) uses Add() method to add Rows with values in DataGridView. Number of parameters depends on the number of fields need to add in a row.


dataGridView1.Rows.Add("CSharp-Language",786);


* dataGridView1 is the object of DataGridView.

I am used 2 parameters ( "CSharp-Language",786) because i am added two fields Name and ID in a Row in DataGridView.

0 comments:

Post a Comment