using System;
using System.Drawing;
using System.Windows.Forms;
class MyClass : Form
{
[STAThread]
public static void Main()
{
Application.Run(new MyClass());
}
public MyClass()
{
Text = "Simple DataGridView";
DataGridView grid = new DataGridView();
grid.Parent = this;
grid.AutoSize = true;
grid.Dock = DockStyle.Fill;
grid.ColumnCount = 3;
grid.Columns[0].HeaderText = "First Name";
grid.Columns[1].HeaderText = "Last Name";
grid.Columns[2].HeaderText = "Email Address";
}
}
|