private void button2_Click(object sender, EventArgs e) { Server.Service1 myserver = new Server.Service1(); myserver.ShowMyTasks(label1.Text); BindingSource bs = new BindingSource(); bs.DataSource = myserver.getTaskList(); dataGridView1.DataSource = bs; }