简体   繁体   中英

Updating RadGridView after Editing Records in Real Time

I'm using Linq and a DBML in my project. I fill my radgridview with one of my tables like this:

gridTarget = db.tblCustomers;

Records will list in the grid. I'm using some child forms to edit and insert new customers. (I'm not doing it via the gridview). After editing/inserting a record How can I update the grid in real time (after closing that child form)?

  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; this.clubsGrid.Items.EditItem(selectedItem); 
  2. Modify the object and then call the CommitEdit() method of the Items collection:

     selectedItem.Name = "new Name of the item"; this.clubsGrid.Items.CommitEdit(); 

Here is the documentation: http://docs.telerik.com/devtools/wpf/controls/radgridview/managing-data/how-to/edit-item-outside-gridview

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM