I have a datagrid populated by a Linq query. When the focused row in the datagrid changes I need to set a variable equal to one of the properties in that object.
I t
DevExpress's xtraGridView has a method like this GetRowCellDisplayText(int rowHandle, GridColumn column). With this method, the following code returns the id from the anonymous type.
var _selectedId = view.GetRowCellDisplayText(rowHandle, "Id");
Though this does not provide an answer to the question "How can I get access to the anonymous object's property?", it still attempts to solve the root cause of the problem.
I tried this with devXpress version 11.1 and I can see that the question was first asked almost 2.5 years ago. Possibly the author of the question might have got an workaround or found the solution himself. Yet, I am still answering so that it might help someone.