Why grid become readonly? How to avoide readonly grid problem?

freek

New Member
I have a DevExpress xtraGrid which I want to bind. When I try to bind, the compiler gives an error that the gridView datasource is readonly. I tried the below approach, my code is\[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;\[/code\]I get the following error:property or indexer 'DevExpress.XtraGrid.Views.Base.BaseView.DataSource' cannot be assigned to -- it is read only I checked my column property of on the gridView and It is not read only. Why I am getting this error? Actually my grid is empty, I am going to bind it to a database.
 
Top