In your Package Manager Console type
Install-Package cooldatagridview
using cooldatagridview;
dataGridView1.DataSource = yourObjetist.ToList();
dataGridView1.CoolGrid();
cooldatagridview also allows the user to navigate the arrow keys on the lines of datagridview.
Overwrite the ProcessCmdKey method of the form and place the following code
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
switch (keyData)
{
case Keys.Up:
dataGridView1.MoveToUp();
break;
case Keys.Down:
dataGridView1.MoveToDown();
break;
default:
break;
}
return base.ProcessCmdKey(ref msg, keyData);
}
If you want to hide a column of datagridview you can use
dataGridView1.HideColumn("ID");
It is available under the MIT license. License