silverlight datagrid refresh
silverlight datagrid refreshOld forum URL: forums.lhotka.net/forums/t/8400.aspx
HK.Lee posted on Saturday, January 23, 2010Hi all,
This is my first silverlight application and I used MVVM of v3.81 to show and edit userlist on same page as following objects.
UserList : ReadOnlyList : bind to datagrid
User : BusinessBase : bind to edit form
T of ViewModel is User and UserList is dependancy property of viewmodel , not assigning dedicated ViewModel.
Create/Delete/Update as well as validation of edit form is fine and viewmodel looks simple and great, however I can't refresh userlist automatically on adding and deleting user through edit form.
As usually did in winforms day, userlist doesn't go to database to refresh himself
whenever child is added or deleted.
Instead viewmodel's onsaved and delegate of delete method call userlist's method to add and delete his child.
I expect datagrid surely be refreshed but not updated automatically, so I thought OnpropertyChanged("UserList") would do the job but no effect.
Any advice would be highly appreciated.
HK.Lee replied on Wednesday, January 27, 2010
Copyright (c) Marimer LLC