I have a class Foo which have two property. I have a thread that do
some process and update class Foo int B. I have a datagridview on main
form. this datagridview data source to this class Foo and column A
binds to string A and column B binds to int B. When i start two
threads, the datagridview able to show two rows and updated int B at
run time. How?
public class Foo
{
public Foo()
{
}
private string a;
public string A
{
set { a = value; }
get { return a; }
}
private int b;
public int B
{
set { b = value; }
get { return b; }
}
}
I try this code, but does not work.
dataGridViewBindingSource.CurrentItemChanged += new
EventHandler(dataGridViewBindingSource_CurrentItem Changed);
void dataGridViewBindingSource_CurrentItemChanged(objec t sender,
EventArgs e)
{
dataGridView.Refresh();
}
Anyone helps. Thanks in advance.