In this article, we will see how to load data into listview from MySql Database using C sharp Windows Application.
{
{
{
InitializeComponent( );
}
{
MySqlCommand cmd = new MySqlCommand( sql , cnn );
listView1.Items.Clear( );
{
listView1.Items.Add( lv );
}
Reader. Close( );
}
{
listView1.GridLines = true;
listView1.View = View. Details;
//Add Column Header
listView1.Columns.Add( “Employee ID”, 150);
listView1.Columns.Add( “First Name”, 150);
listView1.Columns.Add( “Last Name”, 150);
}
}
}
Great stuff. continue doing what you're doing bro!