Last Updated: 25 Jan 2016 09:43 by ADMIN
Created on: 26 Jul 2012 07:29
Category: GridView
Type: Bug Report
FIX. RadGridView - refreshing the entity context of Entity Framework does not update the control
If you refresh an object set property of entity context, the RadGridView is not updated. 

The sample code below does not work:

this.radGridView1.DataSource = entities.Countries;

int maxId = (from c in entities.Countries
                         orderby c.Id descending
                         select c.Id).First();

            Country country = new Country();
            country.Id = maxId + 1;
            country.Name = Path.GetRandomFileName();

            entities.Refresh(System.Data.Objects.RefreshMode.StoreWins, entities.Countries);
1 comment
Ivan Petrov
Posted on: 21 Apr 2015 10:21
RadGridView requires with EntityFramework (EF) 4.1 or above. In version 4.1 of EF, Microsoft added a mechanism to bind a control to the data locally stored on the machine with support for data change notifications.