What I’m trying to do, when we click on button in radform1(Parent), hide radform1 then update the text/label/radgrid header text values in Form1(child form),
once we close the Form1(child form)..close radform1(Parent) as well.
I’m getting a error message : Invalid OPeration Exception was Un-HandledCross-thread operation not valid
Control ‘radPageView1 has been accessed from a thread other than the one on which it was created.
How can i use the invoke or action method to fix this problem?? I couldn’t understand the concept exactly.. Please explain to me what should i do here…Any help is appreciated!
Form1 frm = new Form1();
private void radButton1_Click(object sender, EventArgs e) // French Version Button
{
timer1.Enabled = true;
radProgressBar1.Visible = true;
frm.radGridView1.Columns[0].HeaderText = "Test"; // Change the Radgrid Header Text at Col[0]
}
private void timer1_Tick(object sender, EventArgs e)
{
ticks++;
radProgressBar1.Value1 = ticks;
if (ticks != 100) return;
timer1.Enabled = false;
ticks = 0;
frm.FormClosed += (_, args) => frm.Close();
frm.Hide();
frm.Show();
}
I don’t know if I understand well, but I think you need something like this:
and call
in this way you are sure that the action will be performed inside the right thread.
Hope this helps.