I have a datagrid called datagClients in my project that is binded to
ArrayList from another class called Server. I want datagClients to be
updated every time an event called OnNewConnection is raised, but
datagClients remains blank. Although if I use different event called
button2_Click the datagrid updates fine with new info. Has anyone any
idea what can be the problem here?
//Doesn't work.
public void OnNewConnection(ArrayList clientData)
{//Raises from calss server when new client connects to local
mahcine.
datagClients.DataSource = null;
datagClients.DataSource = Server.list; //ArrayList
atagClients.Refresh();
//MessageBox.Show("Event works!);
}
//WORKING OPTION
private void button2_Click(object sender, EventArgs e)
{
datagClients.DataSource = null;
datagClients.DataSource = Server.list; //ArrayList
datagClients.Refresh();
}
Can anyone help me?
Movees
*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*