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

Refresh specific row in gridview

3 Answers 1435 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Paul Somberg
Top achievements
Rank 2
Paul Somberg asked on 07 Nov 2012, 10:32 AM
I have a gridview which is bound to a list of about 50.000 objects. After changing an objects value in the list (in a seperate pop-up) the row is not updated in the grid.

When I select another row or scroll through the grid, the new value is visible.

Is there a way to refresh the row I just edited? I've tried to update the complete grid with EndUpdate, but this took about 18 seconds. This is way to long.

3 Answers, 1 is accepted

Sort by
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 07 Nov 2012, 11:09 AM
Hello Paul,

If you have an instance of the rowInfo, you can just use the InvalidateRow() method provided by the row.
grid.Rows[0].InvalidateRow();
If you don't have the row you can always get it by using linq on the grid.Rows collection.

You can avoid doing this by binding to a bindinglist and raise the property changed notification event from the changed object.

If you have any other questions, please let me know.


Best Regards,
Emanuel Varga
Winforms MVP
0
Stefan
Telerik team
answered on 07 Nov 2012, 01:01 PM
Here is an example article if needed: http://www.telerik.com/help/winforms/gridview-populating-with-data-reflecting-custom-object-changes-in-rgv.html.

Regards,
Stefan
the Telerik team
Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
0
Paul Somberg
Top achievements
Rank 2
answered on 07 Nov 2012, 01:46 PM
The solution of Emanuel Varga solved my problem.

Thanks for the replies
Tags
GridView
Asked by
Paul Somberg
Top achievements
Rank 2
Answers by
Emanuel Varga
Top achievements
Rank 1
Stefan
Telerik team
Paul Somberg
Top achievements
Rank 2
Share this question
or