Edit an item outside RadGridView

As you probably know, if you edit an item in RadGridView and the business object implements the INotifyPropertyChanged interface - the changes immediately reflect in RadGridView. To achieve the same result when editing an item outside the user interface of RadGridView you should follow a few simple steps:

  1. Before editing the item, find it in the Items collection of the gridview and call the EditItem(item) method of the Items collection:

Club selectedItem = this.clubsGrid.SelectedItem as Club; 
Dim selectedItem As Club = TryCast(Me.clubsGrid.SelectedItem, Club) 
  1. Modify the object and then call the CommitEdit() method of the Items collection:

selectedItem.Name = "new Name of the item"; 
selectedItem.Name = "new Name of the item" 

That's it - the RadGridView will show the updated data immediately.

In this article
Not finding the help you need? Improve this article