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

Update GridView after adding an item

1 Answer 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Manfred
Top achievements
Rank 2
Manfred asked on 08 Apr 2013, 01:06 PM
Hi there,

I have a connection to a MySQL-database and created my classes via EntityFrameWork.
I bound my GrdiView to one of the tables.

If I add a new object to the table, my GridView is not updated, until I reorder the items.
How can I update my GridView without using codebehind, because I am using MVVM for this project.

Best Regards
Manfred

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 11 Apr 2013, 01:46 PM
Hello,

RadGridView has two ways of sensing changes in the source collection and updating the UI respectively.

1. If the source collection implements the INotifyCollectionChanged interface , RadGridView will automatically trigger an update to the UI.

2. For cases where it is not possible to have the source collection implement the INotifyCollectionChanged interface , a manual call to the Rebind() method of RadGridView is required.


All the best,
Pavel Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Manfred
Top achievements
Rank 2
Answers by
Pavel Pavlov
Telerik team
Share this question
or