I have a DevExpress xtraGrid that I want to bind. When I try to bind, the compiler gives an error that the gridView data source is read-only. I tried the approach below my code
NorthwindDataContext db = new NorthwindDataContext();
var r = from p in db.Orders
select p;
var r2 = from p in db.Order_Details
select p;
gridView1.DataSource = r;
gridView2.DataSource = r2;
I get the following error: Property or indexer "DevExpress.XtraGrid.Views.Base.BaseView.DataSource" cannot be assigned - it is read-only
I checked the column property on a gridView and not just readable. Why am I getting this error? My grid is actually empty, I'm going to bind it to the database.
source
share