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
As JaredPar guessed correctly, the return type of GetRow() is object. When working with the DevExpress grid, you could extract the desired value like this:
int clientId = (int)gridView.GetRowCellValue(rowHandle, "ClientId");
This approach has similar downsides like the "hacky anonymous type casts" described before: You need a magic string for identifying the column plus a type cast from object to int.