Using linq select to provide a grid datasource, properties are read-only
- by Kelly
I am using the return from the following call as the datasource for a grid.
public object GetPropertyDataSourceWithCheckBox( )
{
return (
from p in LocalProperties
join c in GetCities( ) on p.CityID equals c.CityID
orderby p.StreetNumber
select new { Selected = false, p.PropertyID, p.StreetNumber, p.StreetName, c.CityName } ).ToList( );
}
I get a checkbox in the grid, but it is READ-ONLY. [For the record, the grid is DevExpress.] Is there a way around this, short of creating a non-anonymous class?