This is a migrated thread and some comments may be shown as answers.

how to refresh grid on parent form from child form

1 Answer 471 Views
Form
This is a migrated thread and some comments may be shown as answers.
Dao
Top achievements
Rank 1
Dao asked on 21 Aug 2009, 09:56 AM
hi all
i use radMDI form and show a radchild form
in radchild form i use a rad grid
i want rad grid clicked will show a dialog form and when the dialog form close will refresh gird in parent form
anybody help me
thanks

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 24 Aug 2009, 10:46 AM
Hello Dao,

Thanks for writing. In your case you could simply pass a reference to RadGridView control in your dialog form and use this reference to refresh the grid when the form closes. Take a look at this code snippet:

public class MyDialogForm : RadForm  
{  
 
    private RadGridView grid;  
 
    public MyDialogForm(RadGridView gridView)  
    {  
      this.grid = gridView;  
    }  
 
    protected override void OnClosing(CancelEventArgs e)  
    {  
        base.OnClosing(e);  
        //Refresh the grid.  
    } 

As you can see, I am using the OnClosing event of the form to perform the operations on RadGridView.

I hope this is helpful.

Sincerely yours,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Form
Asked by
Dao
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or