I have an application, that has 2 usercontrols
In the first usercontrol, there is a datagridview and within that, there is a function that gets the data and fills the datagridview.
public void getdata()
{
}
This function is being called on usercontrol load
In the 2nd user control, after doing registration, etc. I want to call the getdata() function again so the datagridview is updated in 1st usercontrol.
What I have tried:
so this is what I tried:
Code_Sign uc = new Code_Sign();
uc.getdata();
Doing this, the function is called (I tested this by putting a msgbox in the function. The msgbox is displayed)
However, the problem is this. The datagrid view has no changes, e.g the new data is not inserted into the datagridview. Same old data is displayed.
in the getdata() function. I have
bunifuCustomDataGrid1.Rows.Add(
new object[]
{
issuer,
data,
x509.SerialNumber,
x509.FriendlyName
}
);
(I have also tested this with normal datagridview instead of bunifudatagrid. It doesn't work)
I have set modifier of datagrid view to public but i just can't seem to have it working in any way.
Any help would be appreciate. I'm not sure what I am missing. Maybe there is another way which I am not aware of.
Thanks in advance