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

Refresh...

5 Answers 222 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Austin Sung
Top achievements
Rank 1
Austin Sung asked on 07 Nov 2007, 01:43 AM
Hello telerik
I have minor problem with radgridview for winforms...

private void radGridView1_CellDoubleClick_1(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
    int rIdx = e.RowIndex;
    string cn= "";
    
    if
(e != null)
    {
        cn= radGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();

    }
    
    AForm 
af = new AForm(cn);
    
af.ShowDialog();

    
radGridView1.MasterGridViewInfo.UpdateView(true);
}

I want that the AForm closed, then radGridView1 refresh...

Can you give any idea?...


 

5 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 07 Nov 2007, 01:56 PM
Hi Austin Sung,

Thank you for writing.

If you modify the Value property of GridViewCellInfo, the changes will be automatically updated in the grid. Usually, there is no need to call the GridViewInfo.UpdateView or RadGridView.GridElement.Update methods. Please, give us more details on the functionality you would like to implement.

Contact us again, if you have any other questions.

All the best,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Austin Sung
Top achievements
Rank 1
answered on 08 Nov 2007, 12:30 AM
Hello Jack
Thank you for answering.

Here is my problem.
1. I have custom list(customerId, name, phone) in gridview
2. pop up customer info window(showdialog())
3. change the information(name) and close the window
4. still show old information in gridview but already information is changed in database.

if i reload that window, then it show new information..
so, i just want after change the information(close the pop up window)
then gridview refresh...


0
Jack
Telerik team
answered on 08 Nov 2007, 04:46 PM
Hi Austin Sung,

Thank you for these details, we understood the issue.

You are using a custom collection. In this case you need to implement the IBindingList and the INotifyPropertyChanged interfaces in order to notify the grid about the changes in your data source. You may also use the BindingList generic class which has an implementation for the IBindingList interface.

We will be glad to help you if you have other questions.

 
Regards,
Jack
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Deiver
Top achievements
Rank 1
answered on 09 Jul 2012, 06:11 PM
I Had the same problem, but this code worked for me

row.InvalidateRow();
0
Jack
Telerik team
answered on 12 Jul 2012, 02:05 PM
Hi Deiver,

Thank you for sharing this solution with the community. It may work in some cases, however in general you should use the approach described in my previous post. 

If you have further questions, we will be glad to help.
 
Regards,
Jack
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
Austin Sung
Top achievements
Rank 1
Answers by
Jack
Telerik team
Austin Sung
Top achievements
Rank 1
Deiver
Top achievements
Rank 1
Share this question
or